home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PROGEDIT / 3212.ZIP / TECO.ZIP / TECO.DOC < prev    next >
Text File  |  1991-01-21  |  510KB  |  11,105 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                                Standard TECO
  17.  
  18.  
  19.                      TEXT EDITOR AND CORRECTOR FOR THE
  20.                      VAX-11, PDP-11, PDP-10, and PDP-8
  21.  
  22.  
  23.                 USER'S GUIDE AND LANGUAGE REFERENCE MANUAL
  24.  
  25.  
  26.                              May 1985 Edition
  27.  
  28.  
  29.                             TECO-11 VERSION  40
  30.                             TECO-10 VERSION   3
  31.                             TECO-8  VERSION   7
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.      May, 1985
  53.  
  54.      Standard TECO
  55.  
  56.  
  57.  
  58.      The information in this document is  subject  to  change  without
  59.      notice  and  should  not  be construed as a commitment by Digital
  60.      Equipment Corporation or by DECUS.
  61.  
  62.      Neither Digital Equipment Corporation,  DECUS,  nor  the  authors
  63.      assume  any  responsibility  for  the  use or reliability of this
  64.      document or the described software.
  65.  
  66.  
  67.  
  68.                      Copyright (C) 1979, 1985 TECO SIG
  69.  
  70.                General permission to copy or modify, but not
  71.                for  profit, is hereby granted, provided that
  72.                the above copyright notice  is  included  and
  73.                reference  made to the fact that reproduction
  74.                privileges were granted by the TECO SIG.
  75.  
  76.      Standard TECO                                              PAGE i
  77.  
  78.  
  79.  
  80.                                  CONTENTS
  81.  
  82.  
  83.  
  84.  
  85.       INTRODUCTION                                                 1
  86.  
  87.       PREFACE TO THE MAY 1985 EDITION                              4
  88.  
  89.       CHAPTER 1        BASICS OF TECO                              7
  90.  
  91.               1.1      USING TECO                                  7
  92.               1.2      DATA STRUCTURE FUNDAMENTALS                 9
  93.               1.3      FILE SELECTION COMMANDS                    10
  94.               1.3.1       Simplified File Selection               10
  95.               1.3.2       Input File Specification (ER command)   11
  96.               1.3.3       Output File Specification (EW command)  12
  97.               1.3.4       Closing Files (EX command)              13
  98.               1.4      INPUT AND OUTPUT COMMANDS                  14
  99.               1.5      POINTER POSITIONING COMMANDS               15
  100.               1.6      TYPE OUT COMMANDS                          16
  101.               1.6.1       Immediate Inspection Commands           17
  102.               1.7      TEXT MODIFICATION COMMANDS                 18
  103.               1.8      SEARCH COMMANDS                            19
  104.               1.9      SAMPLE EDITING JOB                         20
  105.  
  106.       INTERLUDE                                                   23
  107.  
  108.       CHAPTER 2        INVOKING TECO                              24
  109.  
  110.               2.1      RUNNING TECO                               24
  111.               2.2      CREATING A NEW FILE                        24
  112.               2.3      EDITING AN EXISTING FILE                   24
  113.               2.4      SWITCHES ON TECO AND MAKE COMMANDS         25
  114.               2.5      INVOKING A TECO PROGRAM                    26
  115.               2.6      USER INITIALIZATION                        27
  116.  
  117.       CHAPTER 3        CONVENTIONS AND STRUCTURES                 29
  118.  
  119.               3.1      TECO CHARACTER SET                         29
  120.               3.2      TECO COMMAND FORMAT                        30
  121.               3.2.1       Numeric Arguments                       31
  122.               3.2.2       Text Arguments                          32
  123.               3.2.3       Colon Modifiers                         33
  124.               3.3      DATA STRUCTURES                            34
  125.               3.3.1       Text Buffer                             35
  126.               3.3.2       Q-registers                             36
  127.               3.3.3       Q-register Push-down List               37
  128.               3.3.4       Numeric Values and Flags                37
  129.  
  130.      Standard TECO                                             PAGE ii
  131.  
  132.  
  133.  
  134.       CHAPTER 4        COMMAND STRING EDITING                     38
  135.  
  136.               4.1         Immediate Action Editing Characters     38
  137.               4.2         Immediate Action Commands               41
  138.               4.3         Introduction to Macros                  43
  139.               4.4         Immediate ESCAPE-Sequence Commands      44
  140.               4.5         Operating System Character Filters      46
  141.  
  142.       CHAPTER 5        COMMAND DESCRIPTIONS                       48
  143.  
  144.               5.1      FILE SPECIFICATION COMMANDS                49
  145.               5.1.1       File Opening Commands                   49
  146.               5.1.2       File Specification Switches             51
  147.               5.1.3       File Close and Exit Commands            51
  148.               5.1.4       Secondary Stream Commands               54
  149.               5.1.5       Wildcard Commands                       56
  150.               5.1.6       Direct I/O to Q-Registers               56
  151.               5.2      PAGE MANIPULATION COMMANDS                 58
  152.               5.3      BUFFER POINTER MANIPULATION COMMANDS       61
  153.               5.4      TEXT TYPE OUT COMMANDS                     63
  154.               5.5      DELETION COMMANDS                          66
  155.               5.6      INSERTION COMMANDS                         68
  156.               5.7      SEARCH COMMANDS                            70
  157.               5.8      SEARCH ARGUMENTS                           76
  158.               5.9      Q-REGISTER MANIPULATION                    80
  159.               5.10     ARITHMETIC AND EXPRESSIONS                 86
  160.               5.11     SPECIAL NUMERIC VALUES                     89
  161.               5.12     COMMAND LOOPS                              94
  162.               5.13     BRANCHING COMMANDS                         95
  163.               5.14     CONDITIONAL EXECUTION COMMANDS            101
  164.               5.15     RETRIEVING ENVIRONMENT CHARACTERISTICS    103
  165.               5.16     MODE CONTROL FLAGS                        105
  166.               5.17     SCOPE COMMANDS                            113
  167.               5.17.1      Video Terminal Scope Commands          113
  168.               5.17.2      Refresh Scope Commands                 116
  169.               5.18     PROGRAMMING AIDS                          117
  170.               5.18.1      Text Formatting                        117
  171.               5.18.2      Comments                               117
  172.               5.18.3      Messages                               118
  173.               5.18.4      Tracing                                119
  174.               5.18.5      Convenience Characters                 119
  175.               5.18.6      Memory Expansion                       120
  176.               5.18.7      Case Control                           121
  177.               5.19     MANIPULATING LARGE PAGES                  122
  178.               5.20     TECHNIQUES AND EXAMPLES                   123
  179.  
  180.      Standard TECO                                            PAGE iii
  181.  
  182.  
  183.  
  184.       APPENDIX A       ASCII CHARACTER SET                       128
  185.  
  186.       APPENDIX B       ERROR MESSAGES                            137
  187.  
  188.       APPENDIX C       INCOMPATIBLE, OBSOLETE, AND SYSTEM-SPECIFIC
  189.                        COMMANDS                                  145
  190.  
  191.               C.1      SPECIFIC FEATURES OF TECO-11              145
  192.               C.1.1       TECO Commands                          145
  193.               C.1.2       String Build Constructs                147
  194.               C.2      SPECIFIC FEATURES OF RT-11                148
  195.               C.3      SPECIFIC FEATURES OF RSTS/E               148
  196.               C.4      SPECIFIC FEATURES OF RSX-11/M, RSX-11/D,
  197.                        and IAS                                   149
  198.               C.5      SPECIFIC FEATURES OF VAX/VMS              149
  199.               C.6      SPECIFIC FEATURES OF OS/8                 149
  200.               C.7      SPECIFIC FEATURES OF TOPS-10              150
  201.  
  202.       APPENDIX D       RT-11 OPERATING CHARACTERISTICS           153
  203.  
  204.       APPENDIX E       RSTS/E OPERATING CHARACTERISTICS          157
  205.  
  206.       APPENDIX F       RSX-11 OPERATING CHARACTERISTICS          160
  207.  
  208.       APPENDIX G       VAX/VMS OPERATING CHARACTERISTICS         167
  209.  
  210.       APPENDIX H       OS/8 OPERATING CHARACTERISTICS            175
  211.  
  212.       APPENDIX I       TOPS-10 OPERATING CHARACTERISTICS         187
  213.  
  214.       APPENDIX J       BASIC-PLUS/BASIC-PLUS-2 HANDLING          194
  215.  
  216.       GLOSSARY                                                   197
  217.  
  218.       INDEX                                                      214
  219.  
  220.      Standard TECO                                              PAGE 1
  221.      Introduction
  222.  
  223.  
  224.                                INTRODUCTION
  225.  
  226.      TECO is a powerful text editing  language  available  under  most
  227.      DIGITAL  operating systems.  TECO may be used to edit any form of
  228.      ASCII text:  program sources, command procedures, or manuscripts,
  229.      for  example.   TECO  is  a  character-oriented  editor, and also
  230.      offers a number of facilities for dealing with lines of text.
  231.  
  232.      You can use TECO interactively, issuing commands which are to  be
  233.      executed as soon as they are typed in.  (TECO is an interpreter.)
  234.      In this mode, TECO can be used for tasks ranging from very simple
  235.      to quite complex.
  236.  
  237.      You can write sequences of commands called macros, which  can  be
  238.      stored  and  then  invoked  by  short  commands  or  even  single
  239.      keystrokes.  You can write sequences of commands  to  be  run  as
  240.      TECO   programs,   and  store  them  on  disk  for  execution  at
  241.      convenience.
  242.  
  243.      TECO can be used as an implementation language,  as  it  provides
  244.      powerful   primitive   functions   for  text  processing,  screen
  245.      handling, and keyboard management.  (The VTEDIT program  included
  246.      with  some  TECO  distributions  is  an  example of a full keypad
  247.      editor developed in the TECO language.)
  248.  
  249.      TECO correctly handles most sequential ASCII formats supported by
  250.      the  operating  systems upon which it runs.  It provides flexible
  251.      pattern-matching constructs for text searching, file wildcarding,
  252.      and  special  support  for editing BASIC-PLUS/BASIC-PLUS-2 source
  253.      programs.   A  split  screen  scrolling  feature  allows  command
  254.      dialogue to share the screen with an automatically-updated window
  255.      into the editing buffer.
  256.  
  257.      TECO's syntax  is  terse;   commands  are  designed  to  minimize
  258.      keystrokes.   Also,  the  versatility  of TECO "in all its glory"
  259.      makes it complex.  However, just a few commands  suffice  to  get
  260.      real  work  done,  and  a novice TECO user can begin creating and
  261.      editing text files after only a few hours of  instruction.   More
  262.      powerful features can be learned one at a time, and at leisure.
  263.  
  264.      This manual presents TECO in two stages.  The first part (Chapter
  265.      1)  contains basic information and introduces that set of "just a
  266.      few" commands.
  267.  
  268.      Subsequent chapters describe the full TECO command set, including
  269.      a  review  of  the  those commands presented in Chapter 1.  These
  270.      chapters also introduce the concept  of  TECO  as  a  programming
  271.      language  and  explain how basic editing commands may be combined
  272.      into  "programs"  sophisticated  enough  to   handle   the   most
  273.      complicated editing tasks.
  274.  
  275.      The early sections of this manual include few  specific  examples
  276.      of  commands,  since all TECO commands have a consistent, logical
  277.  
  278.      Standard TECO                                              PAGE 2
  279.      Introduction
  280.  
  281.  
  282.      format which will quickly become apparent to the beginning  user.
  283.      There  is,  however, an extensive example at the end of Chapter 1
  284.      which employs most of the commands introduced up to  that  point.
  285.      Students  of  TECO  should  experiment with each command as it is
  286.      introduced, and then duplicate the examples on their computer.
  287.  
  288.      (If a video terminal which supports split-screen  scrolling  such
  289.      as  a  member of the VT100 or VT200 families is available and the
  290.      TECO being used supports it, seeing both your commands and  their
  291.      effects  in  the  text  buffer  simultaneously  can make learning
  292.      easier.  A command such as "5,7:W" allows  5  lines  for  command
  293.      dialogue,  while  "watching"  the text buffer on the remainder of
  294.      the screen.  The 7:W command is described in Table 5-17B.)
  295.  
  296.      This manual is intended to be a reference manual, and except  for
  297.      Chapter 1 is not a tutorial.  After Chapter 1, it is assumed that
  298.      the reader has a general familiarity with TECO and  is  referring
  299.      to this manual to find detailed information.
  300.  
  301.  
  302.                                  Notation
  303.  
  304.      The following notation  is  used  in  this  manual  to  represent
  305.      special characters:
  306.  
  307.            Notation      ASCII code (octal)       Name
  308.  
  309.            <NULL>          0                      Null
  310.            <BS>           10                      Backspace
  311.            <TAB>          11                      Tab
  312.            <LF>           12                      Line Feed
  313.            <VT>           13                      Vertical Tab
  314.            <FF>           14                      Form Feed
  315.            <CR>           15                      Carriage Return
  316.            <ESCAPE> or $  33                      ESCape or Altmode
  317.            <CTRL/x>        -                      Control-x
  318.            <space>        40                      Space
  319.            <DELETE>      177                      Delete or Rubout
  320.  
  321.            <DELIM> or `    -                      See below
  322.  
  323.      <DELIM> is a character used to signify the end  of  text  strings
  324.      and  TECO commands typed at the console.  (TECO presumes that you
  325.      may need to deal with carriage return and line feed  as  ordinary
  326.      characters  in  ASCII  text, so another character must be used as
  327.      TECO's text-string and command-string delimiter.)
  328.  
  329.      When a command string is  being  executed,  TECO  looks  for  the
  330.      ESCape  character  (octal  033)  as  its  delimiter.   Some newer
  331.      terminals, however, no longer possess an ESCape key.   Late-model
  332.      TECO's  are  capable  of  recognizing  a  surrogate  (some other,
  333.      user-specified) character as signifying an ESCape when  typed  at
  334.      the  console.   Such a character echos as accent grave -- you see
  335.  
  336.      Standard TECO                                              PAGE 3
  337.      Introduction
  338.  
  339.  
  340.      an ` character, and TECO receives  an  ESCape  character.   (Note
  341.      that  TECO  programs,  command  files,  and macros cannot use the
  342.      surrogate, since it is translated to ESCape only when you type it
  343.      at  the console.) For details on choosing a surrogate for ESCape,
  344.      see the EE flag or the 8192 ET bit (section 5.16).
  345.  
  346.      Throughout this manual, the term <DELIM> is used to mean whatever
  347.      character  you type as a text-string or command-string delimiter.
  348.      The ` character is used throughout to mean whichever character is
  349.      echoed  for  a  keystroke  which passes an ESCape to TECO;  if no
  350.      ESCape surrogate is active, you will see a $ instead.
  351.  
  352.      Control  characters,  <CTRL/x>,  are  produced  by  striking  the
  353.      CONTROL key and a character key simultaneously.
  354.  
  355.      Throughout this manual, upper case characters  will  be  used  to
  356.      represent TECO commands.
  357.  
  358.      Standard TECO                                              PAGE 4
  359.      Preface to the May 1985 edition
  360.  
  361.  
  362.                       PREFACE TO THE MAY 1985 EDITION
  363.  
  364.  
  365.      Trading in the ESCape key
  366.  
  367.           In the beginning, terminals had ESCape keys.  (Go  back  far
  368.           enough  and  the  device TT:  stands for might actually have
  369.           existed on the system, too.) Programs wanting to treat  <CR>
  370.           &  Co.  as data needed another character to serve as command
  371.           delimiter, and ESCape looked available.
  372.  
  373.           Times   change.    Welcome   to   ESCape    sequences,    to
  374.           cursor-control and function keys.  Farewell to $$.
  375.  
  376.           See the Introduction for the notation used in  this  manual.
  377.           Hello ``.
  378.  
  379.  
  380.      Changes to the manual
  381.  
  382.           This  edition  of  the  manual  incorporates  new   material
  383.           pertinent  to the enhancements to TECO-11 between Version 36
  384.           and Version 40 (see below).
  385.  
  386.           Although this manual is still not intended to be a tutorial,
  387.           some "how to learn" suggestions (such as use of split-screen
  388.           scrolling) were added, as were indications of how  TECO  can
  389.           be used to build custom-designed editors.
  390.  
  391.           Numerous smaller changes were  also  made:   clarifications,
  392.           new  index  and  glossary  entries,  additional  explanatory
  393.           material and cross referrals, correction of old  typographic
  394.           errors, and (no doubt) addition of new ones.
  395.  
  396.      Standard TECO                                              PAGE 5
  397.      Preface to the May 1985 edition
  398.  
  399.  
  400.      From Version 36 to Version 40 - affected section numbers
  401.  
  402.         Manual organization/additions --
  403.  
  404.           Introduction to Macros (new section), 4.3
  405.  
  406.           Split-screen scrolling, 5.17
  407.  
  408.           "Immediate action commands" renamed
  409.           to "immediate inspection commands", 1,6.1
  410.  
  411.           "Immediate action editing characters" (new name), 4.1
  412.  
  413.           VAX/VMS filespec qualifiers, format/attribute table, G.11
  414.  
  415.           Eight-bit ASCII character set table, Appendix A
  416.  
  417.           Handling for BASIC-PLUS-x source files, Appendix J
  418.  
  419.         "Significant" software changes --
  420.  
  421.           ESCape surrogate - EE flag, 8192 ET bit, 5.16
  422.  
  423.           Reverse paging (-P, et al, VAX/VMS only), 5.2
  424.  
  425.           Reverse searching (-N, et al, VAX/VMS only), 5.7
  426.  
  427.           Local Q-registers, 3.3.2
  428.  
  429.           Local Q-register manipulation, 5.9
  430.  
  431.           Immediate ESCape-sequence commands, 4.4
  432.  
  433.           :^T, read/decode a keystroke, 5.11
  434.  
  435.           32 ED bit controls immediate ESC-seq commands, 5.16
  436.  
  437.           Acceptance and handling of 8-bit characters, [throughout]
  438.  
  439.           Typeout of 8-bit data, and the 4096 ET bit, 5.16
  440.  
  441.           n:^T, one-shot binary-mode character typeout, 5.4
  442.  
  443.           TECO HELP facilities on VAX/VMS, G.13
  444.  
  445.         "Minor" software changes --
  446.  
  447.           ^W as immediate mode command (screen re-paint), 4.2
  448.  
  449.           <DELIM> character as immediate inspection command, 1.6.1,
  450.            4.2
  451.  
  452.           Null tag allowed in computed GOTO, 5.13
  453.  
  454.      Standard TECO                                              PAGE 6
  455.      Preface to the May 1985 edition
  456.  
  457.  
  458.  
  459.           nFRtext` command (replace n characters), 5.6
  460.  
  461.           m,nFRtext` command (replace from m to n), 5.6
  462.  
  463.           ^E (form feed flag) can now be user-set, 5.11
  464.  
  465.           Setting 1:W changes width and O/S characteristic, 5.17
  466.  
  467.           WRAP/NOWRAP set by 256 ET bit on VAX/VMS, 5.16
  468.  
  469.           128 ED bit inhibits auto-refresh in split scrolling, 5.16
  470.  
  471.           Search matching with diacritical marks, 5.16
  472.  
  473.           New 0:W codes for VT102 and GIGI scope types, 5.17
  474.  
  475.           VAX/VMS handling of ^T (disabled when), 4.5
  476.  
  477.      Standard TECO                                              PAGE 7
  478.      Basics of TECO
  479.  
  480.  
  481.                                  CHAPTER 1
  482.  
  483.                               BASICS OF TECO
  484.  
  485.  
  486.      1.1 USING TECO
  487.  
  488.      TECO may be called from command level by typing  the  appropriate
  489.      command, followed by a carriage return:
  490.  
  491.            For RT-11, OS/8, TOPS-10, and TOPS-20  R TECO
  492.  
  493.            For RSTS/E                             RUN TECO$:TECO -or-
  494.                                                   EDIT/TECO
  495.  
  496.            For RSX-11                             RUN $TEC
  497.  
  498.            For VAX/VMS                            RUN SYS$SYSTEM:TECO
  499.  
  500.      TECO will respond by printing an asterisk at the left  margin  to
  501.      indicate  that  it  is  ready  to  accept user commands.  At this
  502.      point, you may type one or more commands.
  503.  
  504.      A TECO command consists of one or two characters  which  cause  a
  505.      specific  operation  to  be performed.  Some TECO commands may be
  506.      preceded or followed  by  arguments.   Arguments  may  be  either
  507.      numeric  or  textual.   A  numeric  argument is simply an integer
  508.      value which can be used to indicate, for example, the  number  of
  509.      times  a command should be executed.  A text argument is a string
  510.      of ASCII characters which might be, for example, words of text or
  511.      a file specification.
  512.  
  513.      If a command requires a numeric argument,  the  numeric  argument
  514.      always  precedes  the  command.   If  a  command  requires a text
  515.      argument, the text argument always  follows  the  command.   Each
  516.      text  argument  is  terminated  by a special character (usually a
  517.      <DELIM>  character,  which  TECO  hears  as  an  ESCape   -   see
  518.      Introduction).   This  indicates  to TECO that the next character
  519.      typed will be the first character of a new command.
  520.  
  521.      TECO accumulates commands as they are typed in a command  string,
  522.      and  executes  commands  upon  receipt of two consecutive <DELIM>
  523.      characters.  <DELIM> may be any character  you  select  (if  your
  524.      TECO   and   operating   system  support  user-selectable  ESCape
  525.      surrogates - see sections on ET and EE flags).  When you type the
  526.      character you have designated as <DELIM>, TECO receives an ESCape
  527.      character, and an ` (accent grave) is echoed.  (If  you  are  not
  528.      using  an  ESCape surrogate -- that is, you are actually pressing
  529.      an ESCape key -- a dollar  sign  is  echoed.)  The  accent  grave
  530.      character is used in examples throughout this manual to represent
  531.      typed <DELIM>s.  Note that the carriage return character  has  no
  532.      special  significance  to  TECO;   only the <DELIM><DELIM> forces
  533.      execution of the command string.
  534.  
  535.      Standard TECO                                              PAGE 8
  536.      Using TECO
  537.  
  538.  
  539.      TECO executes command strings from left to right until either all
  540.      commands have been executed or a command error is recognized.  It
  541.      then prints an asterisk to signal that additional commands may be
  542.      entered.
  543.  
  544.      If TECO encounters an  erroneous  command,  it  prints  an  error
  545.      message and ignores the erroneous command as well as all commands
  546.      which follow it.  All error messages are of the form:
  547.  
  548.      ?XXX   Message
  549.  
  550.      where XXX is an error code and the message is  a  description  of
  551.      the error.  Some error messages mention the specific character or
  552.      string of characters in error.  In  these  error  messages,  TECO
  553.      represents the non-printing special characters as follows:
  554.  
  555.           Character      Form Displayed
  556.  
  557.           <TAB>          <TAB>
  558.           <LF>           <LF>
  559.           <VT>           <VT>
  560.           <FF>           <FF>
  561.           <CR>           <CR>
  562.           <ESCAPE>       <ESC>
  563.           <CTRL/x>       <^x>
  564.  
  565.  
  566.      Every error message is  followed  by  an  asterisk  at  the  left
  567.      margin,  indicating  that  TECO  is  ready  to  accept additional
  568.      commands.  If you type a single question mark character  after  a
  569.      TECO-generated  error  message,  TECO  will  print  the erroneous
  570.      command string up to and including the character which caused the
  571.      error  message.   This  helps  you to find errors in long command
  572.      strings and to  determine  how  much  of  a  command  string  was
  573.      executed before the error was encountered.
  574.  
  575.      You can correct typing errors by hitting the  DELETE  key,  which
  576.      may  be  labeled DEL or RUBOUT on your keyboard.  Each depression
  577.      of the DELETE key deletes one character and  echoes  it  on  your
  578.      terminal,  beginning  with  the  last  character  typed.  If your
  579.      terminal is a CRT, TECO will actually erase the deleted character
  580.      from  the  screen.   You can delete an entire command string this
  581.      way, if necessary.  To delete an entire line of  commands,  enter
  582.      the  character  <CTRL/U>,  typed  by holding down the CONTROL key
  583.      while depressing the "U" key.
  584.  
  585.      When you are done editing, use the EX command to  exit  TECO,  as
  586.      described below in section 1.3.4.
  587.  
  588.      Standard TECO                                              PAGE 9
  589.      Data Structure Fundamentals
  590.  
  591.  
  592.      1.2 DATA STRUCTURE FUNDAMENTALS
  593.  
  594.      TECO considers any string of ASCII codes to  be  text.   Text  is
  595.      broken  down  into  units  of  characters,  lines,  and pages.  A
  596.      character is one ASCII code.  A line of text is a string of ASCII
  597.      codes  including one line terminator (usually a line feed) as the
  598.      last character on the line.  A page of text is a string of  ASCII
  599.      codes  including one form feed character as the last character on
  600.      the page.
  601.  
  602.      TECO maintains a text buffer in which text is stored.  The buffer
  603.      usually  contains one page of text, but the terminating form feed
  604.      character never appears in the buffer.   TECO  also  maintains  a
  605.      text buffer pointer.  The pointer is a movable position indicator
  606.      which is never located directly on a  character,  but  is  always
  607.      between characters:  between two characters in the buffer, before
  608.      the first character in the buffer, or after the last character in
  609.      the buffer.
  610.  
  611.      Line feed and form feed characters are inserted automatically  by
  612.      TECO.   A  line  feed is automatically appended to every carriage
  613.      return typed to TECO and a form feed is appended to the  contents
  614.      of  the  buffer by certain output commands.  Additional line feed
  615.      and form feed characters may be entered into the buffer as  text.
  616.      If  a  form  feed  character  is entered into the buffer, it will
  617.      cause a page break upon output;  text  following  the  form  feed
  618.      will begin a new page.
  619.  
  620.      Finally, TECO maintains an input file and an output file, both of
  621.      which  are  selected  by  the  user  through  file  specification
  622.      commands.  The input file may be on any device  from  which  text
  623.      may  be  accepted.  The output file may be on any device on which
  624.      edited text may be written.
  625.  
  626.      TECO functions as a "pipeline" editor.  Text  is  read  from  the
  627.      input  file  into the text buffer, and is written from the buffer
  628.      onto the output file.   In  the  VAX/VMS  implementation,  it  is
  629.      possible  to  "back up" as well as page forward in the file being
  630.      edited.  In other implementations, once text has been written  to
  631.      the  output file, it cannot be accessed again without closing the
  632.      output file and reopening it as an input file.
  633.  
  634.      Standard TECO                                             PAGE 10
  635.      File Selection Commands
  636.  
  637.  
  638.      1.3 FILE SELECTION COMMANDS
  639.  
  640.      Input and output files may be specified to TECO in several  ways.
  641.      The   following  sections  present  first  a  simple  method  for
  642.      specifying files,  and  then  more  sophisticated  commands  that
  643.      permit flexible file selection.
  644.  
  645.  
  646.                                    NOTE
  647.  
  648.          All of the following file selection  commands  are  shown
  649.          with  a  general  argument  of  "filespec".   The  actual
  650.          contents of this filespec argument are  operating  system
  651.          dependent.  See the operating characteristics appendices.
  652.          Examples include a mixture of  file  specifications  from
  653.          various operating systems.
  654.  
  655.  
  656.      1.3.1 Simplified File Selection
  657.  
  658.      For most simple  applications,  you  can  use  special  operating
  659.      system  commands to specify the name of the file you wish to edit
  660.      at the same time that you start up TECO.
  661.  
  662.      To create a new file:
  663.  
  664.                                MAKE filespec
  665.  
  666.      This command starts up TECO and creates the  specified  file  for
  667.      output.
  668.  
  669.      To edit an existing file:
  670.  
  671.                                TECO filespec
  672.  
  673.      This command starts up TECO and  opens  the  specified  file  for
  674.      editing  while  preserving  the original file (as a backup file).
  675.      It also automatically brings the first page of the file into  the
  676.      text  buffer.   These functions simulate the EB command described
  677.      in Chapter 5.
  678.  
  679.      If any of the  above  commands  do  not  seem  to  work  on  your
  680.      operating   system,   consult   the   appropriate   appendix  for
  681.      information  about  how  to  install  TECO  and  its   associated
  682.      operating system commands.
  683.  
  684.      Standard TECO                                             PAGE 11
  685.      File Selection Commands
  686.  
  687.  
  688.      1.3.2 Input File Specification (ER command)
  689.  
  690.      TECO will  accept  input  text  from  any  input  device  in  the
  691.      operating  system.  The input device may be specified by the text
  692.      string supplied in the ER  command  (and  which,  like  any  text
  693.      argument,  is terminated by a <DELIM> character).  The ER command
  694.      causes TECO to open the specified file or print an error  message
  695.      if  the  file  is  not  found.   This  command does not cause any
  696.      portion of the file to be read into  the  text  buffer,  however.
  697.      The following examples illustrate use of the ER command.
  698.  
  699.  
  700.      COMMAND             FUNCTION
  701.  
  702.      ERfilespec`         General  form  of  the   ER   command   where
  703.                          "filespec"  is  the  designation of the input
  704.                          file.  The command is terminated by a <DELIM>
  705.                          character.
  706.  
  707.      ERPR:`              Prepare to read an input file from the  paper
  708.                          tape reader.
  709.  
  710.      ERPROG.MAC`         Prepare to read input file PROG.MAC from  the
  711.                          system's default device.
  712.  
  713.      ERDX1:PROG.FOR`     Prepare to  read  input  file  PROG.FOR  from
  714.                          DX1:.
  715.  
  716.  
  717.      TECO will only keep one  input  and  one  output  file  open  and
  718.      selected  at  a  time.   The current input file may be changed by
  719.      simply using the ER command to specify a new file.
  720.  
  721.      It is not always necessary to specify an input file.  If you want
  722.      to  create  a  file  without  using any previously edited text as
  723.      input, you  may  type  commands  to  insert  the  necessary  text
  724.      directly  into  the text buffer from the keyboard and, at the end
  725.      of each page, write the contents of the  buffer  onto  an  output
  726.      file.   Since  all  input is supplied from the keyboard, no input
  727.      file is necessary.
  728.  
  729.      Standard TECO                                             PAGE 12
  730.      File Selection Commands
  731.  
  732.  
  733.      1.3.3 Output File Specification (EW command)
  734.  
  735.      TECO will write  output  text  onto  any  output  device  in  the
  736.      operating  system.   The output file may be specified by means of
  737.      the text string supplied in an EW command.  If the output  device
  738.      is  a file-structured device (for example, a disk), the file name
  739.      and any extension must be supplied.  If a file name is  specified
  740.      but  no  device  is  explicitly  specified,  the system's default
  741.      device is assumed.  The following examples illustrate use of  the
  742.      EW command.
  743.  
  744.  
  745.      COMMAND             FUNCTION
  746.  
  747.      EWfilespec`         General  form  of  the   EW   command   where
  748.                          "filespec"  is  the designation of the output
  749.                          file.  The command is terminated by a <DELIM>
  750.                          character.
  751.  
  752.      EWSYS:TEXT.LST`     Prepare to  write  output  file  TEXT.LST  on
  753.                          SYS:.
  754.  
  755.      EWPROG`             Prepare to write  output  file  PROG  on  the
  756.                          system's default device.
  757.  
  758.      ERDX1:INPUT.MAC`EWOUTPUT.MAC``
  759.                          Open an input file INPUT.MAC to be  found  on
  760.                          DX1:    and   open   an   output  file  named
  761.                          OUTPUT.MAC.  The double  <DELIM>  (echoed  as
  762.                          ``)  terminates the command string and causes
  763.                          the string to be  executed.   Note  that  the
  764.                          <DELIM>  which  terminates the EW command may
  765.                          be one of the two <DELIM>s  which  terminates
  766.                          the command string.
  767.  
  768.  
  769.      You do not need to specify an output file if  you  only  want  to
  770.      examine  an  input  file,  without  making  permanent  changes or
  771.      corrections.  In this case, the contents of the input file may be
  772.      read  into  the  text  buffer  page  by  page and examined at the
  773.      terminal.  Since all output is printed on the user  terminal,  no
  774.      output file is needed.
  775.  
  776.      Standard TECO                                             PAGE 13
  777.      File Selection Commands
  778.  
  779.  
  780.      1.3.4 Closing Files (EX command)
  781.  
  782.      When you are finished editing a file, use the EX command to close
  783.      out  the  file  and  exit from TECO.  The current contents of the
  784.      text buffer and any portion of the input file that has  not  been
  785.      read yet are copied to the output file before TECO exits.  The EX
  786.      command takes no arguments.
  787.  
  788.  
  789.      COMMAND             FUNCTION
  790.  
  791.      EX                  Write the text buffer to the  current  output
  792.                          file, move the remainder of the current input
  793.                          file to the current output  file,  close  the
  794.                          output  file,  then  return  to the operating
  795.                          system.
  796.  
  797.      ERFILE.MAC`EWCOPY.MAC`EX``
  798.                          Open an  input  file  FILE.MAC  and  open  an
  799.                          output file named COPY.MAC, then copy all the
  800.                          text in the input file to  the  output  file,
  801.                          close the output file, and exit from TECO.
  802.  
  803.      Standard TECO                                             PAGE 14
  804.      Input and Output Commands
  805.  
  806.  
  807.      1.4 INPUT AND OUTPUT COMMANDS
  808.  
  809.      The following commands permit pages of text to be read  into  the
  810.      TECO  text  buffer  from an input file or written from the buffer
  811.      onto an output file.  Once a page of text has been  written  onto
  812.      the  output  file,  it  cannot  be  recalled into the text buffer
  813.      unless the output file is closed and reopened as an input file.
  814.  
  815.  
  816.      COMMAND      FUNCTION
  817.  
  818.      Y       Clear the text buffer, then read the  next  page  of  the
  819.              input  file  into the buffer.  Since the Y command causes
  820.              the contents of the text buffer to be  lost,  it  is  not
  821.              permitted  if an output file is open and there is text in
  822.              the buffer.
  823.  
  824.      P       Write the contents of the text buffer onto the next  page
  825.              of  the  output  file, then clear the buffer and read the
  826.              next page of the input file into the buffer.
  827.  
  828.      nP      Execute the P command n times.  If n is not specified,  a
  829.              value of 1 is assumed.
  830.  
  831.      After each Y, P, or nP command, TECO positions the pointer before
  832.      the first character in the buffer.
  833.  
  834.      Standard TECO                                             PAGE 15
  835.      Pointer Positioning Commands
  836.  
  837.  
  838.      1.5 POINTER POSITIONING COMMANDS
  839.  
  840.      The buffer pointer provides the means of specifying the  location
  841.      within  a  block  of  text  at  which  insertions,  deletions  or
  842.      corrections are to be made.  The following  commands  permit  the
  843.      buffer pointer to be moved to a position between any two adjacent
  844.      characters in the buffer.
  845.  
  846.  
  847.      COMMAND      FUNCTION
  848.  
  849.      J       Move the pointer to the beginning of the buffer.
  850.  
  851.      L       Move the pointer forward to a position between  the  next
  852.              line feed and the first character of the next line.  That
  853.              is, advance the pointer to  the  beginning  of  the  next
  854.              line.
  855.  
  856.      nL      Execute the L command  n  times,  where  n  is  a  signed
  857.              integer.   A positive value of n moves the pointer to the
  858.              beginning of the nth line following the  current  pointer
  859.              position.   A negative value moves the pointer backward n
  860.              lines and positions it at the beginnning of the nth  line
  861.              preceding  the  current  position.   If  n  is  zero, the
  862.              pointer is moved to the beginning of the line on which it
  863.              is currently positioned.
  864.  
  865.      C       Advance the pointer forward across one character.
  866.  
  867.      nC      Execute the C command  n  times,  where  n  is  a  signed
  868.              integer.  A positive value of n moves the pointer forward
  869.              across n characters.  A negative value  of  n  moves  the
  870.              pointer  backward across n characters.  If n is zero, the
  871.              pointer position is not changed.  Remember that there are
  872.              two characters, <CR> and <LF>, at the end of each line in
  873.              the buffer.
  874.  
  875.      These commands may be used to move the buffer pointer across  any
  876.      number of lines or characters in either direction;  however, they
  877.      will not move the pointer across a page boundary.  If a C command
  878.      attempts to move the pointer backward beyond the beginning of the
  879.      buffer or forward past the end of the buffer, an error message is
  880.      printed and the command is ignored.
  881.  
  882.      If an L command attempts to exceed the page  boundaries  in  this
  883.      manner,  the  pointer  is  positioned at the boundary which would
  884.      have been exceeded.  Thus, in a page of 2000 lines,  the  command
  885.      "-4000L" would position the pointer before the first character in
  886.      the buffer.  The command "4000L" would position the pointer after
  887.      the last character in the buffer.  No error message is printed in
  888.      either case.
  889.  
  890.      Standard TECO                                             PAGE 16
  891.      Type Out Commands
  892.  
  893.  
  894.      1.6 TYPE OUT COMMANDS
  895.  
  896.      The following commands permit sections of the text in the  buffer
  897.      to  be  printed  out  on  your  terminal  for examination.  These
  898.      commands do not move the buffer pointer.
  899.  
  900.  
  901.      COMMAND      FUNCTION
  902.  
  903.      T       Type the contents of the text  buffer  from  the  current
  904.              position  of  the  pointer through and including the next
  905.              line feed character.
  906.  
  907.      nT      Type n lines, where n is a signed  integer.   A  positive
  908.              value of n causes the n lines following the pointer to be
  909.              typed.   A  negative  value  of  n  causes  the  n  lines
  910.              preceding  the  pointer  to  be typed.  If n is zero, the
  911.              contents of the buffer from the beginning of the line  on
  912.              which  the pointer is located up to the pointer is typed.
  913.              This is useful for verifying the location of  the  buffer
  914.              pointer.
  915.  
  916.      HT      Type the entire contents of the text buffer.
  917.  
  918.      V       Type the current line.  Equivalent to the sequence "0TT".
  919.  
  920.      Standard TECO                                             PAGE 17
  921.      Type Out Commands
  922.  
  923.  
  924.      1.6.1 Immediate Inspection Commands [not in TECO-10]
  925.  
  926.      In addition, there are available as a  convenience  abbreviations
  927.      of two frequently used type out commands.  Each one consists of a
  928.      single character, and must be  the  very  first  character  typed
  929.      after TECO prints its prompting asterisk.  Each of these commands
  930.      takes effect immediately;  there is no  need  to  follow  any  of
  931.      these  commands by any <DELIM> character.  For this reason, these
  932.      commands are known as "immediate" commands  (see  Chapter  4  for
  933.      more information on immediate commands).
  934.  
  935.  
  936.      COMMAND      FUNCTION
  937.  
  938.      <LF>    Immediately execute  an  LT  command.   This  command  is
  939.              issued by typing the line feed key as the first keystroke
  940.              after TECO's prompt.  It causes TECO to move the  pointer
  941.              ahead  one  line  and  then  type  out  the new line.  On
  942.              terminals without a line feed key,  typing  <CTRL/J>  has
  943.              the same effect.  (See also the next command.)
  944.  
  945.      <DELIM> Immediately execute an LT command.  (Action identical  to
  946.              that  of  the  command  above.) This command is available
  947.              when an ESCape surrogate is active, and  causes  TECO  to
  948.              move the pointer ahead one line and then type out the new
  949.              line when a <DELIM> is the first thing typed after TECO's
  950.              prompting asterisk.
  951.              [RSTS/E only]
  952.  
  953.      <BS>    Immediately execute  a  -LT  command.   This  command  is
  954.              issued by typing the backspace key as the first keystroke
  955.              after TECO's prompt.  It causes TECO to move the  pointer
  956.              back  one  line and then type the line just moved over on
  957.              the terminal.  On  terminals  without  a  backspace  key,
  958.              typing <CTRL/H> has the same effect.
  959.  
  960.  
  961.  
  962.      These commands are useful for "walking through" a file, examining
  963.      and/or modifying lines one at a time.
  964.  
  965.      Standard TECO                                             PAGE 18
  966.      Text Modification Commands
  967.  
  968.  
  969.      1.7 TEXT MODIFICATION COMMANDS
  970.  
  971.      You can insert or delete text from the buffer using the following
  972.      commands:
  973.  
  974.  
  975.      COMMAND      FUNCTION
  976.  
  977.      Itext`  Where "text" is a string of ASCII  characters  terminated
  978.              by  a  <DELIM> character.  The specified text is inserted
  979.              into the buffer at the current position of  the  pointer.
  980.              The  pointer  is  positioned  immediately  after the last
  981.              character of the insertion.
  982.  
  983.      K       Delete the contents of the text buffer from  the  current
  984.              position of the pointer up to and including the next line
  985.              feed character.
  986.  
  987.      nK      Execute the K command  n  times,  where  n  is  a  signed
  988.              integer.   A  positive  value  of  n  causes  the n lines
  989.              following the pointer to be deleted.  A negative value of
  990.              n causes the n lines preceding the pointer to be deleted.
  991.              If n is  zero,  the  contents  of  the  buffer  from  the
  992.              beginning  of the line on which the pointer is located up
  993.              to the pointer is deleted.
  994.  
  995.      HK      Delete the entire contents of the text buffer.
  996.  
  997.      D       Delete the character following the buffer pointer.
  998.  
  999.      nD      Execute the D command  n  times,  where  n  is  a  signed
  1000.              integer.   A  positive value of n causes the n characters
  1001.              following the pointer to be deleted.  A negative value of
  1002.              n  causes  the  n  characters preceding the pointer to be
  1003.              deleted.  If n is zero, the command is ignored.
  1004.  
  1005.      Like the L and C commands, the K and D commands may  not  execute
  1006.      across  page  boundaries.  If a K command attempts to delete text
  1007.      up to and across the beginning or end of the buffer, text will be
  1008.      deleted  only  up  to the buffer boundary and the pointer will be
  1009.      positioned at the boundary.  No error message is  printed.   A  D
  1010.      command  attempting  to  delete text past the end or beginning of
  1011.      the text buffer will produce an error  message  and  the  command
  1012.      will be ignored.
  1013.  
  1014.      Standard TECO                                             PAGE 19
  1015.      Search Commands
  1016.  
  1017.  
  1018.      1.8 SEARCH COMMANDS
  1019.  
  1020.      The following commands may be used to search the input file for a
  1021.      specified string of characters.
  1022.  
  1023.  
  1024.      COMMAND      FUNCTION
  1025.  
  1026.      Stext`  Where "text" is a string of ASCII  characters  terminated
  1027.              by  a  <DELIM> character.  This command searches the text
  1028.              buffer for the next occurrence of the specified character
  1029.              string  following  the  current pointer position.  If the
  1030.              string is found, the pointer is positioned after the last
  1031.              character on the string.  If it is not found, the pointer
  1032.              is positioned immediately before the first  character  in
  1033.              the buffer and an error message is printed.
  1034.  
  1035.      Ntext`  Performs the same function as the S command  except  that
  1036.              the  search  is  continued  across  page  boundaries,  if
  1037.              necessary, until the character string is found or the end
  1038.              of  the  input  file is reached.  If the end of the input
  1039.              file  is  reached,  an  error  message  is  printed.   On
  1040.              VAX/VMS,  you  can  "back  up" into the file and continue
  1041.              editing, although doing  so  uses  TECO  features  beyond
  1042.              those  introduced  in  this  chapter.   Using  only basic
  1043.              features (or a TECO implementation other  than  VAX/VMS),
  1044.              you  must close the output file and reopen it as an input
  1045.              file before you can edit the file further.
  1046.  
  1047.      Both the S command and the N  command  begin  searching  for  the
  1048.      specified  character  string  at  the  current  position  of  the
  1049.      pointer.  Therefore, neither command will locate  any  occurrence
  1050.      of  the  character  string  which  precedes  the  current pointer
  1051.      position, nor will it locate any character string which is  split
  1052.      across a page boundary.
  1053.  
  1054.      Both commands execute the  search  by  attempting  to  match  the
  1055.      command  argument,  character for character, with some portion of
  1056.      the buffer contents.  If an N command  reaches  the  end  of  the
  1057.      buffer  without  finding  a match for its argument, it writes the
  1058.      contents of the buffer onto the output file, clears  the  buffer,
  1059.      reads  the  next  page  of  the  input  file into the buffer, and
  1060.      continues the search.
  1061.  
  1062.      Standard TECO                                             PAGE 20
  1063.      Sample Editing Job
  1064.  
  1065.  
  1066.      1.9 SAMPLE EDITING JOB
  1067.  
  1068.      The following sample editing job is included to help the new user
  1069.      to  achieve  a  greater understanding of the basic TECO commands.
  1070.      The entire terminal output from the  editing  run  is  reproduced
  1071.      intact,  with  numbers  added in the left margin referring to the
  1072.      explanatory paragraphs which follow.
  1073.  
  1074.  
  1075.  
  1076.  
  1077.      1< *EWDT1:FILE1.TXT``
  1078.      2< *HKIMR. JOHN P. JONES
  1079.       ! COMPUTER ELECTRONICS CORPORATION
  1080.       ! BOSTON, MASAASACHUSETTS
  1081.       !
  1082.       ! DEAR MR. JONES:
  1083.       !
  1084.       ! I WAS PLEASED TO RECEIVE YOUR REQUEST FOR INFORMATION
  1085.       ! PERTAINING TO THE NEW TECO TEXT EDITING AND CORRECTING
  1086.       ! PROGRAM.
  1087.       !
  1088.       ! ENCLOSED IS A COPY OF THE TECO USERS'S GUIDE, WHICH
  1089.       ! SHOULD ANSWER ALL OF YOUR QUESTIONS.
  1090.       !
  1091.       ! SINCERELY,
  1092.       !
  1093.       !
  1094.       !
  1095.       !
  1096.       ! ``
  1097.      3< *-20LSETTS`I 02150``
  1098.       ! *STION`2C13DIREGARDING``
  1099.      4< *SGUIDE`-5DIMANUAL``
  1100.       ! *SELY`0T``
  1101.       ! SINCERELY*0KIVERY TRULY YOURS``
  1102.       ! *HT``
  1103.       ! MR. JOHN P. JONES
  1104.       ! COMPUTER ELECTRONICS CORPORATION
  1105.       ! BOSTON, MASSACHUSETTS 02150
  1106.       !
  1107.       ! DEAR MR. JONES:
  1108.       !
  1109.       ! I WAS PLEASED TO RECEIVE YOUR REQUEST FOR INFORMATION
  1110.       ! REGARDING THE NEW TECO TEXT EDITING AND CORRECTING
  1111.       ! PROGRAM.
  1112.       !
  1113.       ! ENCLOSED IS A COPY OF THE TECO USER'S MANUAL, WHICH
  1114.       ! SHOULD ANSWER ALL OF YOUR QUESTIONS.
  1115.       !
  1116.       ! VERY TRULY YOURS,
  1117.       !
  1118.       !
  1119.  
  1120.      Standard TECO                                             PAGE 21
  1121.      Sample Editing Job
  1122.  
  1123.  
  1124.       !
  1125.       !
  1126.       !
  1127.      5< *EX``
  1128.       ! (TECO is rerun, operating system dependent)
  1129.       ! *ERDT1:FILE1.TXT`EWLP:``
  1130.      6< *Y5KIMR. JAMES B. SMITH
  1131.       ! DATEK ASSOCIATES, INC.
  1132.       ! 122 MAIN STREET WEST
  1133.       ! AUSTIN, TEXAS
  1134.       !
  1135.       ! DEAR MR. SMITH:
  1136.       ! ``
  1137.       ! *HT``
  1138.       ! MR. JAMES B. SMITH
  1139.       ! DATEK ASSOCIATES, INC.
  1140.       ! 122 MAIN STREET WEST
  1141.       ! AUSTIN, TEXAS
  1142.       !
  1143.       ! DEAR MR. SMITH:
  1144.       !
  1145.       ! I WAS PLEASED TO RECEIVE YOUR REQUEST FOR INFORMATION
  1146.       ! REGARDING THE NEW TECO TEXT EDITING AND CORRECTING
  1147.       ! PROGRAM.
  1148.       !
  1149.       ! ENCLOSED IS A COPY OF THE TECO USER'S MANUAL, WHICH
  1150.       ! SHOULD ANSWER ALL OF YOUR QUESTIONS.
  1151.       !
  1152.       ! VERY TRULY YOURS,
  1153.       !
  1154.       !
  1155.       !
  1156.       !
  1157.       !
  1158.       ! *EX``
  1159.  
  1160.  
  1161.      1) At this  point,  the  user  called  TECO  into  memory.   TECO
  1162.      responded  by  printing an asterisk at the left margin.  The user
  1163.      then entered  an  EW  command,  opening  an  output  file  called
  1164.      "FILE1.TXT" on DT1.  There is no input file.  Upon receipt of the
  1165.      double <DELIM> (echoed as ``), TECO created the designated output
  1166.      file, then printed another asterisk at the left margin.
  1167.  
  1168.      2) The user entered a command string consisting of two  commands.
  1169.      The  HK  command  cleared  the text buffer (not really necessary,
  1170.      since it was already empty), and the I command inserted 18  lines
  1171.      of  text into the buffer, including 8 blank lines.  TECO executed
  1172.      these commands upon receipt of the  second  double  <DELIM>.   At
  1173.      this  point,  the buffer pointer was positioned at the end of the
  1174.      buffer, following the last line feed character in the text.  Note
  1175.      that   the   user   made   an   error   while   typing  the  word
  1176.      "MASSACHUSETTS".  He typed "MASA", then realized his mistake  and
  1177.  
  1178.      Standard TECO                                             PAGE 22
  1179.      Sample Editing Job
  1180.  
  1181.  
  1182.      struck the DELETE key once to delete the second "A".  TECO echoed
  1183.      the deleted character.  The user then typed the correct character
  1184.      and continued the insertion.
  1185.  
  1186.      3) The user typed -20L to move the pointer to  the  beginning  of
  1187.      the  buffer  and SETTS` to position the pointer immediately after
  1188.      the  character  string  "ETTS"   (which   terminates   the   word
  1189.      "MASSACHUSETTS").   He then used an I command to insert one space
  1190.      and a five-digit zip code.  A second  S  command  positioned  the
  1191.      pointer  after  the word "INFORMATION".  The 2C command moved the
  1192.      pointer to the beginning of the next line  (carriage  return  and
  1193.      line  feed  count two characters), and the user deleted the words
  1194.      "PERTAINING TO" and replaced them with the word "REGARDING".
  1195.  
  1196.      4) The user continued editing by positioning  the  pointer  after
  1197.      the  word  "GUIDE".   He  then deleted this word, and replaced it
  1198.      with the word  "MANUAL".   Finally,  he  searched  for  the  word
  1199.      "SINCERELY", typed 0T to determine that the pointer was correctly
  1200.      positioned between the Y and the  comma  which  follows  it,  and
  1201.      typed  0K  to delete everything on the line except the comma.  He
  1202.      then  inserted  "VERY  TRULY  YOURS"  in  place   of   the   word
  1203.      "SINCERELY".   An HT command caused the edited text to be printed
  1204.      at the terminal.
  1205.  
  1206.      5) The command string EX`` caused the contents of the  buffer  to
  1207.      be written onto the output file and the output file to be closed.
  1208.      The user then reentered TECO and reopened the file "FILE1.TXT" as
  1209.      an input file and specified the line printer as an output file.
  1210.  
  1211.      6) This command  string  reads  the  first  (and  only)  page  of
  1212.      "FILE1.TXT"  into the buffer, deleted the first 5 lines, replaced
  1213.      them with a different address and salutation,  then  printed  the
  1214.      contents  of  the  buffer  on  the  terminal for verification and
  1215.      finally printed the new version  of  the  letter  onto  the  line
  1216.      printer.   Note  that  the  previous  version of the letter still
  1217.      resides in file "FILE1.TXT" on DT1.
  1218.  
  1219.      Standard TECO                                             PAGE 23
  1220.      Interlude
  1221.  
  1222.  
  1223.                                  INTERLUDE
  1224.  
  1225.      The rest of this manual is a  description  of  TECO  in  all  its
  1226.      glory.  TECO is a complex editor and has many features because it
  1227.      has been under development for a long time.  (TECO is older  than
  1228.      some  of  the  readers  of this manual!) Do not try to understand
  1229.      everything the first time through.  If you find that what you are
  1230.      reading  seems  hopelessly obscure, or makes no sense whatsoever,
  1231.      skip to the next section and come back to it some time later.  It
  1232.      will be a while before you need all of TECO's features.
  1233.  
  1234.      This manual is meant to be a reference manual and not a tutorial.
  1235.      Readers  who  are  first  learning  TECO  may wish to consult the
  1236.      following document (available from Digital Equipment Corporation)
  1237.      for more basic material:  DEC-10-UTECA-A-D INTRODUCTION TO TECO.
  1238.  
  1239.      The commands described in this manual are  those  implemented  in
  1240.      TECO-11  Version  40,  TECO-8  Version  7, and TECO-10 Version 3.
  1241.      Some of the more obscure commands may not be present  under  some
  1242.      operating  systems,  in which case this is indicated by a note in
  1243.      the form [Not in TECO-x].
  1244.  
  1245.      This manual also describes some (but not necessarily all) of  the
  1246.      obscure  commands  that  belong to one implementation of TECO but
  1247.      not to the other implementations.  Such commands are flagged by a
  1248.      note  of  the  form  [TECO-x only].  These commands are not to be
  1249.      considered part of the so-called "Standard TECO" and  should  not
  1250.      be  used  in  applications  that may be run on multiple operating
  1251.      systems.  Consult also the appendices for commands that are  very
  1252.      operating system dependent.
  1253.  
  1254.      Standard TECO                                             PAGE 24
  1255.      Invoking TECO
  1256.  
  1257.  
  1258.                                  CHAPTER 2
  1259.  
  1260.  
  1261.                                INVOKING TECO
  1262.  
  1263.  
  1264.      2.1 RUNNING TECO
  1265.  
  1266.      To run TECO with no special options or  defaults,  use  the  same
  1267.      command  on  your  operating system that you would use to run any
  1268.      other program.  The command is system dependent  but  is  usually
  1269.      something like
  1270.  
  1271.                                  RUN TECO
  1272.  
  1273.      Consult the  appendix  that  describes  your  operating  system's
  1274.      characteristics for details.
  1275.  
  1276.  
  1277.      2.2 CREATING A NEW FILE
  1278.  
  1279.      As described in Chapter 1, most operating systems  use  the  same
  1280.      command to invoke TECO for the purpose of creating a new file:
  1281.  
  1282.                                MAKE filespec
  1283.  
  1284.      The "MAKE filespec" command takes as its single argument the file
  1285.      specification   for   the   file   to   be  created.   This  file
  1286.      specification must  conform  to  the  conventions  used  by  your
  1287.      operating  system.   If  a file by that name already exists, TECO
  1288.      will give  you  a  warning  message  telling  you  that  you  are
  1289.      superseding an existing file.
  1290.  
  1291.      The  MAKE  command  invokes  TECO  and  performs   an   effective
  1292.      EWfilespec`` command, as described in Chapter 1.
  1293.  
  1294.  
  1295.      2.3 EDITING AN EXISTING FILE
  1296.  
  1297.      As Chapter 1 states, most operating systems use the same  command
  1298.      to invoke TECO for the purpose of editing an existing file:
  1299.  
  1300.                                TECO filespec
  1301.  
  1302.      The "TECO filespec"  command  takes  as  its  argument  the  file
  1303.      specification for the file to be edited.  The file will be opened
  1304.      for input and output, with back-up protection.  That  means  that
  1305.      the  system will save the original version of the source file (in
  1306.      case you 'blow' the edit).  If  your  operating  system  supports
  1307.      file  version  numbers,  a  new version will be created.  If your
  1308.      operating system does  not  support  file  version  numbers,  the
  1309.      original  file will be preserved in a file with the same name but
  1310.      with a backup extension (.BAK).
  1311.  
  1312.      Standard TECO                                             PAGE 25
  1313.      Editing an Existing File
  1314.  
  1315.  
  1316.      The  TECO  command  invokes  TECO  and  performs   an   effective
  1317.      EBfilespec`Y``  command.  Note that the first page of the file is
  1318.      brought  into  memory  and  that  the  text  buffer  pointer   is
  1319.      positioned at the start of the file.
  1320.  
  1321.      If, at any time during the edit, you discover that  the  edit  is
  1322.      invalid,  slowly  (so  TECO  can  respond  to  them)  type enough
  1323.      <CTRL/C>s to get you back to the operating system.  You will find
  1324.      that your original file has been preserved.
  1325.  
  1326.      TECO remembers the filespec given in a MAKE or TECO command.   If
  1327.      TECO  is  invoked  with  the command "TECO", with no filespec, it
  1328.      will open the file edited last (i.e., the remembered filespec).
  1329.  
  1330.  
  1331.      2.4 SWITCHES ON TECO and MAKE COMMANDS
  1332.  
  1333.      The TECO and MAKE commands can take switches (qualifiers) of  the
  1334.      form /SWITCH.  These switches are described below.
  1335.  
  1336.  
  1337.                          SWITCHES ON COMMAND LINES
  1338.  
  1339.      System    Switch         Meaning
  1340.  
  1341.      RSTS/E    /SIZE:n        start with nK word editing area
  1342.                /SIZE:+n       start  with  nK  additional   words   of
  1343.                               editing area
  1344.  
  1345.      RSTS/E
  1346.      RSX-11
  1347.      VAX/VMS   /INSPECT       Do not create an output file
  1348.                /FIND          Initially  position  to   the   position
  1349.                               marker  left  in  the file by the VTEDIT
  1350.                               macro and delete the marker.
  1351.                /NOCREATE      Do not automatically create a  new  file
  1352.                               if   the  file  specified  by  the  TECO
  1353.                               command does not exist.
  1354.                /NOINI         Do   not   use   TECO.INI   to   perform
  1355.                               initialization
  1356.                /NOMEMORY      Do not  remember  the  argument  to  the
  1357.                               invocation command.
  1358.                /SCROLL        Automatically   enter    split    screen
  1359.                               scrolling   mode,   using   1/4  of  the
  1360.                               screen's lines  as  the  scrolling  area
  1361.                               (available on VT100 terminals only).
  1362.                /VTEDIT        Load VTEDIT video terminal editor
  1363.  
  1364.      The /SCROLL switch may take a value of the following form:
  1365.  
  1366.                /SCROLL:n      Enter split screen scrolling mode, using
  1367.                               n lines for the scrolling area.
  1368.  
  1369.      Standard TECO                                             PAGE 26
  1370.      Switches on TECO and MAKE Commands
  1371.  
  1372.  
  1373.      The /VTEDIT switch may also take values (of the form :value).
  1374.  
  1375.                /VTEDIT:HOLD   Start up in hold screen mode
  1376.                /VTEDIT:SEEALL Start up in SEEALL mode
  1377.  
  1378.      These values can be combined, viz.:  /VTEDIT:HOLD:SEEALL.
  1379.  
  1380.  
  1381.      2.5 INVOKING A TECO PROGRAM
  1382.  
  1383.      All operating systems except TOPS-10 and  TOPS-20  use  the  same
  1384.      command  to let you start up execution of a TECO program (macro).
  1385.      This is the MUNG command.
  1386.  
  1387.      The MUNG command has the form
  1388.  
  1389.                                MUNG filespec
  1390.  
  1391.      where filespec is the name of the TECO program that is to be run.
  1392.      If  no  file extension (file type) is specified, .TEC is assumed.
  1393.      This command executes the  TECO  code  that  appears  within  the
  1394.      specified  file.   It  invokes  TECO  and  performs  an effective
  1395.      EIfilespec`` command (consult the appendices for operating-system
  1396.      dependent  differences).   The  contents  of  the  specified file
  1397.      should generally end with a double ESCAPE so that execution  will
  1398.      start immediately.
  1399.  
  1400.      Another form of this command is
  1401.  
  1402.                             MUNG filespec,data
  1403.  
  1404.      where "data" is any string of ASCII characters to  be  passed  to
  1405.      the  TECO program.  This version of the MUNG command invokes TECO
  1406.      and issues an effective
  1407.  
  1408.                             Idata`EIfilespec``
  1409.  
  1410.      command.  Under TECO-11, a space, tab, or a slash (/) may be used
  1411.      instead of the comma.
  1412.  
  1413.      Standard TECO                                             PAGE 27
  1414.      Invoking a TECO Program
  1415.  
  1416.  
  1417.      2.6 USER INITIALIZATION
  1418.  
  1419.      You can specify initialization commands to  TECO  by  creating  a
  1420.      file  called  TECO.INI.   If,  upon  start-up,  TECO finds a file
  1421.      called TECO.INI in your area, TECO executes the commands in  that
  1422.      file.   You  can  use  TECO.INI commands to set initial values of
  1423.      flags and to tailor TECO to your needs.  You  must,  however,  be
  1424.      very  careful  in  constructing  code for your TECO.INI file:  an
  1425.      error in this code may keep TECO from running at all!
  1426.  
  1427.      If you include unusual commands in your initialization file,  you
  1428.      would  be  prudent to surround such commands with the ?  command.
  1429.      This causes TECO to type the commands out when they are  executed
  1430.      (see  section  5.18.4).   You  should  also  print an informative
  1431.      message on the terminal reminding other users that  this  version
  1432.      of TECO has been customized.
  1433.  
  1434.      Example 1:
  1435.  
  1436.                                    ?1ED?
  1437.  
  1438.      The user initialization file sets the ED flag  to  1  so  that  ^
  1439.      characters  in  search strings have their traditional meaning (do
  1440.      not convert the next character to a control character).  The file
  1441.      also causes the command to be typed out when it is executed.
  1442.  
  1443.      Example 2:
  1444.  
  1445.      0,16ED ^A[Dot preserved on failing searches]^A 13^T 10^T
  1446.  
  1447.      The user initialization file causes future search string failures
  1448.      to  preserve  the  pointer  position.   It  also prints a message
  1449.      informing all users of this feature.
  1450.  
  1451.      Standard TECO                                             PAGE 28
  1452.      User Initialization
  1453.  
  1454.  
  1455.      In TECO-11, the TECO.INI commands  may  return  a  value  to  the
  1456.      command processor.  Such a value, if present, is interpreted as a
  1457.      set of bit encoded flags that  control  the  startup  processing.
  1458.      The following bits may be set:
  1459.  
  1460.                Value&1   Automatically load the VTEDIT  macro  (as  if
  1461.                          the user had typed TECO/VTEDIT).
  1462.  
  1463.                Value&4   Inhibit use of the memory  file  (as  if  the
  1464.                          user had typed TECO/NOMEMORY).
  1465.  
  1466.                Value&16  Automatically load VTEDIT  and  start  it  in
  1467.                          SEEALL   mode  (as  if  the  user  had  typed
  1468.                          TECO/VTEDIT:SEEALL).
  1469.  
  1470.                Value&32  Automatically load VTEDIT  and  start  it  in
  1471.                          HOLDSCREEN  mode  (as  if  the user had typed
  1472.                          TECO/VTEDIT:HOLD).
  1473.  
  1474.                Value&128 Automatically enter  split  screen  scrolling
  1475.                          mode (as if the user had typed TECO/SCROLL).
  1476.  
  1477.                Value&256 Inhibit automatic creation of the output file
  1478.                          if  the  input file does not exist (as if the
  1479.                          user had typed TECO/NOCREATE).
  1480.  
  1481.      For  additional  information  on  initialization,   consult   the
  1482.      operating system specific appendices.
  1483.  
  1484.      Standard TECO                                             PAGE 29
  1485.      Conventions and Structures
  1486.  
  1487.  
  1488.                                  CHAPTER 3
  1489.  
  1490.                         CONVENTIONS AND STRUCTURES
  1491.  
  1492.  
  1493.      3.1 TECO CHARACTER SET
  1494.  
  1495.      TECO accepts the full 8-bit ASCII character set.  (In other  than
  1496.      TECO-11,  characters  typed  at  the  console  have their 8th bit
  1497.      trimmed off.  If your terminal does not transmit or  receive  all
  1498.      of  the  ASCII codes, you can still insert the full character set
  1499.      into your TECO buffer, using special commands (see section 5.6).
  1500.  
  1501.      For more information  on  TECO's  handling  of  8-bit  characters
  1502.      (including  on  terminals capable of displaying only 7-bit data),
  1503.      see the description of the 4096 ET bit, in section 5.16.
  1504.  
  1505.      When TECO is maintaining a window into the text buffer, a special
  1506.      facility  (called  "SEEALL"  or  "View All" mode) is available to
  1507.      explicitly show certain characters which normally do  not  print,
  1508.      such  as  <CR>,  <FF>, and <TAB>.  This mode is controlled by the
  1509.      3:W flag, which is described in section 5.17.
  1510.  
  1511.      TECO command strings may be entered using upper  case  characters
  1512.      (as  shown throughout this manual) or lower case characters.  For
  1513.      example,  the  commands  MQ,  mQ,  Mq,  and   mq   are   executed
  1514.      identically.   A file containing upper and lower case text can be
  1515.      edited in the same way as a  file  containing  upper  case  only,
  1516.      although  this  may  be  clumsy  to  do  from  an upper case only
  1517.      terminal.  TECO can be set to convert lower case  alphabetics  to
  1518.      upper  case  as they are typed in;  commands to enable or disable
  1519.      lower case type-in will be presented in section 5.16.
  1520.  
  1521.      Control characters are generally echoed by TECO  as  a  caret  or
  1522.      up-arrow  followed  by  the  character.  Some control characters,
  1523.      such as <CTRL/L> (form feed) and  <CTRL/G>  (bell)  echo  as  the
  1524.      function  they  perform.   In  many cases, you can type a control
  1525.      character as a caret (up-arrow) followed by a character,  and  it
  1526.      will be treated as if it had been entered using the control key.
  1527.  
  1528.      There are exceptions to the interchangeable use  of  the  CONTROL
  1529.      key  and  the  caret.   When  a  control character is used as the
  1530.      delimiter of a text string (as explained in Section 3.2.2 below),
  1531.      it  must be entered in its <CTRL/x> form.  This form must also be
  1532.      used if the control  character  is  the  second  character  of  a
  1533.      two-character  command,  or  is  being  entered  as an immmediate
  1534.      action command.  Since certain control  characters  have  special
  1535.      meaning  in  text  arguments,  some of them (such as <CTRL/N> and
  1536.      <CTRL/X>), must be entered into a text string using  the  CONTROL
  1537.      key and preceded by <CTRL/Q>, ^Q, <CTRL/R>, or ^R.
  1538.  
  1539.      Standard TECO                                             PAGE 30
  1540.      Conventions and Structures
  1541.  
  1542.  
  1543.      3.2 TECO COMMAND FORMAT
  1544.  
  1545.      Each TECO commands consists of one or two characters.
  1546.  
  1547.      TECO commands  may  be  strung  together  (concatenated)  into  a
  1548.      command  string.   If  a  command  in  the string returns numeric
  1549.      value(s), it or they will be passed to the following command.
  1550.  
  1551.  
  1552.                                    NOTE
  1553.  
  1554.          Most commands which return a value are expressly designed
  1555.          for that purpose.  A few commands (such as n%q and m,n:W,
  1556.          q.v.) can be used to cause an action, and also  return  a
  1557.          value.  Good programming practice suggests following such
  1558.          a command with <DELIM> or caret-[ if the  returned  value
  1559.          is not intended to affect the following command.
  1560.  
  1561.  
  1562.      A TECO command may be preceded by one or two  numeric  arguments.
  1563.      Some TECO commands may be followed by a text argument.  Many TECO
  1564.      commands can be modified by "@" (see section 3.2.2) and/or by ":"
  1565.      (see section 3.2.3).
  1566.  
  1567.      When TECO commands are concatenated into  a  command  string,  no
  1568.      delimiter  is necessary between commands except for one necessary
  1569.      to delimit a text argument or one as suggested in the note above.
  1570.  
  1571.      TECO commands are accumulated into a command string as  they  are
  1572.      typed.   The  command string is executed when it is terminated by
  1573.      typing two consecutive <DELIM> characters.   TECO  then  executes
  1574.      the  commands  in  the  order in which they appear in the command
  1575.      string, until the string is exhausted or an error occurrs.  (Some
  1576.      TECO  commands  cause branching or looping, so altering the order
  1577.      of execution.)
  1578.  
  1579.      TECO's <DELIM> character is (internally) the ESCape  (octal  33).
  1580.      Because  newer  terminals  use  the  ESCape  character as part of
  1581.      control sequences (and some terminals no longer even  possess  an
  1582.      ESCape key), provision is made for you to designate a key on your
  1583.      terminal to cause an ESCape to be sent to TECO -- that is, to act
  1584.      as  an  ESCape  surrogate.  (See the EE flag and the 8192 ET bit,
  1585.      section 5.16.) Because the key you press to delimit text  strings
  1586.      and  TECO commands may be the ESCape key or may be the surrogate,
  1587.      this manual uses the indirect term <DELIM> to mean whichever  one
  1588.      you are using.  When an ESCape surrogate is active, the character
  1589.      you see is `.  (When no surrogate is active,  you  see  $.)  This
  1590.      manual uses the ` character.
  1591.  
  1592.      Standard TECO                                             PAGE 31
  1593.      Conventions and Structures
  1594.  
  1595.  
  1596.      3.2.1 Numeric Arguments
  1597.  
  1598.      Most TECO commands may be preceded by a numeric  argument.   Some
  1599.      numeric  arguments  must  be positive;  others can be negative or
  1600.      zero.  The maximum size of any numeric argument is restricted, as
  1601.      summarized in the following table:
  1602.  
  1603.                        Signed           Unsigned
  1604.              System          Min      Max         Max
  1605.              TECO-8        -2**12+1    +2**12-1    2**13-1
  1606.              TECO-10        -2**34    +2**34-1    2**35-1
  1607.              TECO-11        -2**15    +2**15-1    2**16-1
  1608.  
  1609.                TABLE 3-1  Restrictions on numeric arguments
  1610.  
  1611.      Exceeding these ranges of values can cause unpredictable results.
  1612.      So  can  using a negative argument with a command that takes only
  1613.      an unsigned argument.
  1614.  
  1615.      Numeric arguments can be used in the following ways:
  1616.  
  1617.              - Character commands such as J, C, R, and D take a single
  1618.                numeric   argument   which  represents  the  number  of
  1619.                characters that the command is to act on.
  1620.  
  1621.              - Such commands as P, PW, and < perform  an  action  that
  1622.                can   be   repeated.    The  numeric  argument  is  the
  1623.                repetition count.
  1624.  
  1625.              - Some commands, such as ED, ET, ^E, ^X, ES, EU, and  EV,
  1626.                control  the setting of variables called flags.  When a
  1627.                numeric  argument  is  specified,  the  value  of  that
  1628.                argument  becomes the new value of the associated flag.
  1629.                When no numeric argument is  specified,  these  command
  1630.                return the value of the associated flag.
  1631.  
  1632.              - Line commands such as T, K, X, FB, and  FC  operate  on
  1633.                lines.   They take zero, one, or two numeric arguments.
  1634.                If one argument (n) is  specified,  it  represents  the
  1635.                number  of  lines  over  which  the  command is to have
  1636.                effect,  beginning  at  the  current   buffer   pointer
  1637.                position.   A  positive  (non-zero)  n  affects  a text
  1638.                running from the current pointer position  to  the  nth
  1639.                following  line delimiter.  A negative n affects a text
  1640.                running from the pointer back to the beginning  of  the
  1641.                line  containing the nth previous line delimiter.  When
  1642.                n is zero, the affected text runs from the beginning of
  1643.                the current line to the current pointer position.  When
  1644.                n is omitted, n = 1 is assumed.
  1645.  
  1646.                When a line  command  contains  two  numeric  arguments
  1647.                (m,n),  these  represent  the pointer positions between
  1648.                which text is affected.  Unless the description of  the
  1649.  
  1650.      Standard TECO                                             PAGE 32
  1651.      Conventions and Structures
  1652.  
  1653.  
  1654.                command  says  the  order  of  these  two  arguments is
  1655.                important, they may be entered in either order.
  1656.  
  1657.      When a command that normally takes an argument is specified  with
  1658.      no argument, TECO executes the command in the most common or most
  1659.      useful way, as shown in the following table:
  1660.  
  1661.          Command   Default Argument    Default Action
  1662.  
  1663.          C        1        Advance 1 character
  1664.          R        1        Back over 1 character
  1665.          L        1        Advance 1 line
  1666.          J        0        Jump to start of buffer
  1667.          V        1        View 1 line
  1668.          D        1        Delete 1 character
  1669.          K        1        Kill 1 line
  1670.          S, N, etc.    1        Search for first occurrence
  1671.          %        1        Increment Q-register by 1
  1672.          X        1        Extract one line
  1673.  
  1674.                        Table 3-2  Default Arguments
  1675.  
  1676.      These default arguments reduce the number  of  keystrokes  needed
  1677.      for common TECO actions.
  1678.  
  1679.  
  1680.      3.2.2 Text Arguments
  1681.  
  1682.      Many TECO commands take a text (character string) argument.   The
  1683.      string  is placed immediately after the command and consists of a
  1684.      sequence of ASCII characters terminated by  a  <DELIM>  character
  1685.      (or in the case of !  and ^A commands, by the command character).
  1686.      The string of ASCII characters may not include a  <DELIM>,  since
  1687.      this  would terminate the string prematurely, but may include any
  1688.      other character.  (Some characters may be difficult to enter from
  1689.      a  terminal  because  they  are TECO immediate action commands or
  1690.      because they have been filtered out by the operating system).
  1691.  
  1692.      Examples of text arguments:
  1693.  
  1694.                Sabc`                    Search for the string "abc"
  1695.  
  1696.                ^UAHELLO`                Insert the text  "HELLO"  into
  1697.                                         Q-register A
  1698.  
  1699.                OBEGIN`                  Branch to the tag specified by
  1700.                                         the string "BEGIN"
  1701.  
  1702.      Some TECO commands require two  text  arguments.   Each  argument
  1703.      must be followed by a <DELIM> character, as follows:
  1704.  
  1705.                FSabc`def`               Replace string "abc" by "def"
  1706.  
  1707.      Standard TECO                                             PAGE 33
  1708.      Conventions and Structures
  1709.  
  1710.  
  1711.      You can include a <DELIM> character in a  text  string  by  using
  1712.      another  format  of  text  argument.  In this alternate form, the
  1713.      string is delimited on both sides by any ASCII code that does not
  1714.      otherwise  appear  in the string.  You signal that this format is
  1715.      being used by inserting an @ character  before  the  command,  as
  1716.      follows:
  1717.  
  1718.                @ER5TEST.FOR5            Open the file  "TEST.FOR"  for
  1719.                                         input.   The delimiter used is
  1720.                                         "5"
  1721.  
  1722.                @^A+Hello out there!+    Type the  message  "Hello  out
  1723.                                         there!"  on the terminal.  The
  1724.                                         delimiter is "+"
  1725.  
  1726.      Unpredictable  results  will  occur  if  another   TECO   command
  1727.      intervenes  between an @ sign and the command that it is supposed
  1728.      to affect.  Note that a control character  used  as  a  delimiter
  1729.      must  be  entered  as  <CTRL/x> (that is, in its single-keystroke
  1730.      form).
  1731.  
  1732.  
  1733.  
  1734.      3.2.3 Colon Modifiers
  1735.  
  1736.      The colon (:) command modifies the action of  the  next  command.
  1737.      In  some  cases, it will cause the next command to return a value
  1738.      indicating whether it  has  failed  or  succeeded.   A  zero  (0)
  1739.      indicates  that the command has failed, while a -1 indicates that
  1740.      it has succeeded.  The colon modifier is used this way with  such
  1741.      commands  as  :ER,  :EB, :EN, :S, :N, :FS, :FN, :FB, and :FC.  If
  1742.      the next sequential command requires a positive argument, the  -1
  1743.      is interpreted as the largest possible positive number.  In other
  1744.      cases, such as :Gq and :=, the colon modifier changes the meaning
  1745.      of  the  command.  Unpredictable results may occur if you place a
  1746.      colon directly before a  TECO  command  that  does  not  normally
  1747.      accept a colon modifier.
  1748.  
  1749.      If both the :  and the @ (string delimiter)  are  used  with  the
  1750.      same command, they may be placed in either order.
  1751.  
  1752.      Standard TECO                                             PAGE 34
  1753.      Conventions and Structures
  1754.  
  1755.  
  1756.      3.3 DATA STRUCTURES
  1757.  
  1758.      A good way to begin the study of a  programming  language  is  to
  1759.      forget  the  commands, for the moment, and concentrate instead on
  1760.      the  data  structures.   This  section  follows  that   approach,
  1761.      describing both the values on which TECO operates and the buffers
  1762.      and registers in which these values are stored.
  1763.  
  1764.      TECO manipulates two types of data, namely,
  1765.  
  1766.          o  The character string:  a sequence of zero  or  more  ASCII
  1767.             characters, and
  1768.  
  1769.          o  The integer:  a  numeric  value  that  may  be  signed  or
  1770.             unsigned.
  1771.  
  1772.  
  1773.      The text that TECO edits is, of course, a character string.  Less
  1774.      obviously,  the command string by which the user controls TECO is
  1775.      also a character string.  The counters and indices for  character
  1776.      string  manipulation,  and  the  repetition  counts for loops are
  1777.      integers.
  1778.  
  1779.      Character   strings   and   integers   have   distinct   internal
  1780.      representation  and  this  is reflected in the design of the TECO
  1781.      commands.  Commands designed for character strings do not work on
  1782.      integers and vice versa.
  1783.  
  1784.      The data structures described  in  this  section  are  frequently
  1785.      applied  to  character  strings.  Structure is never "built into"
  1786.      the data, but rather is attributed  to  the  data  by  particular
  1787.      commands   and  conventions.   Thus  "lines"  of  characters  are
  1788.      recognized by line manipulation commands, but  not  by  character
  1789.      manipulation  commands,  which  view  an end-of-line character as
  1790.      just another ASCII code.
  1791.  
  1792.      The following are definitions for the line and the page in TECO:
  1793.  
  1794.          o  Any character string can be divided  into  TECO  lines  by
  1795.             considering the line to be ended by either
  1796.  
  1797.                  a line feed (octal 12)
  1798.                  a form feed (octal 14)
  1799.                  a vertical tab (octal 13) or
  1800.                  the end of the given character string
  1801.  
  1802.          o  Any character string can be divided  into  TECO  pages  by
  1803.             considering the page to be ended by either
  1804.  
  1805.                  a form feed (octal 14) or
  1806.                  the end of the given character string
  1807.  
  1808.      Standard TECO                                             PAGE 35
  1809.      Conventions and Structures
  1810.  
  1811.  
  1812.      These data structures are used  to  achieve  two  quite  separate
  1813.      results:   the formatting of type out and the logical division of
  1814.      data.
  1815.  
  1816.  
  1817.      3.3.1 Text Buffer
  1818.  
  1819.      The main storage of TECO is the text  buffer.   The  text  buffer
  1820.      stores  a single character string that TECO edits.  A text buffer
  1821.      pointer is used to address text in the buffer;  it is moved about
  1822.      by  many  TECO commands.  The text buffer pointer never points to
  1823.      characters in the buffer;   it  is  always  pointing  at  pointer
  1824.      positions  (between characters).  The available pointer positions
  1825.      in the text buffer are sequentially numbered  beginning  with  0.
  1826.      Pointer  position  0  is the position at the start of the buffer,
  1827.      just to the left of the first character.  Pointer position  1  is
  1828.      the next position, just to the right of the first character, etc.
  1829.      As an example,  suppose  the  text  buffer  contains  the  string
  1830.      FOOBAR.   Then seven text buffer pointer positions are determined
  1831.      as shown by the arrows in the following figure:
  1832.  
  1833.              F     O     O     B     A     R
  1834.               |     |     |     |     |     |     |
  1835.               0     1     2     3     4     5     6
  1836.  
  1837.  
  1838.      Note that there are 6 characters  in  the  buffer  and  that  the
  1839.      highest  numbered  pointer  position  is 6.  The pointer position
  1840.      number is equal  to  the  number  of  characters  preceding  that
  1841.      position.
  1842.  
  1843.      Useful definitions of "current" objects are made with respect  to
  1844.      the text buffer pointer as follows:
  1845.  
  1846.           1.  The  current  character  of  the  text  buffer  is   the
  1847.               character  just  to  the  right  of the pointer.  If the
  1848.               pointer is at the end of the text buffer,  there  is  no
  1849.               character  to  the  right of the buffer pointer, and the
  1850.               current character does not exist.
  1851.  
  1852.           2.  The current line of the text buffer  is  the  TECO  line
  1853.               that  contains  the  current  character.  In the special
  1854.               case that the pointer is at the end of the  buffer,  the
  1855.               current  line  is everything back to (but not including)
  1856.               the last end-of-line character.
  1857.  
  1858.           3.  The current page of the text buffer  is  the  TECO  page
  1859.               that  contains  the  current  character.  In the special
  1860.               case that the pointer is at the end of the  buffer,  the
  1861.               current  page  is everything back to (but not including)
  1862.               the last form feed character (or the  beginning  of  the
  1863.               buffer).
  1864.  
  1865.      Standard TECO                                             PAGE 36
  1866.      Conventions and Structures
  1867.  
  1868.  
  1869.      When the text buffer pointer is at the end of the text buffer and
  1870.      the  last  character  of  the buffer is an end-of-line character,
  1871.      then the current  line  is  an  empty  string  according  to  the
  1872.      definition  just given.  In this case, TECO performs the required
  1873.      operation on this empty string.  For example, if the  pointer  is
  1874.      at  the  end of the buffer and TECO is commanded to kill (delete)
  1875.      the next 3 lines, then  the  empty  string  is  killed  3  times.
  1876.      Similarly, if the pointer is at the end of the buffer and TECO is
  1877.      commanded to advance the pointer 5 lines, the pointer will remain
  1878.      at  the end of the buffer.  No error message will be given.  In a
  1879.      like fashion, if the pointer is at the end of the first  line  of
  1880.      the  buffer,  and  TECO  is  instructed to extract the previous 4
  1881.      lines (into a Q-register), then only the first line is  extracted
  1882.      since it is presumed to be preceded by 3 empty lines.
  1883.  
  1884.  
  1885.  
  1886.      3.3.2 Q-registers
  1887.  
  1888.      TECO provides data storage registers, called  Q-registers,  which
  1889.      may  be  used  to  store  single  integers and/or ASCII character
  1890.      strings.  Each Q-register is divided into two storage areas.   In
  1891.      its  numeric  storage  area, each Q-register can store one signed
  1892.      integer.  In its text storage area, each Q-register can store  an
  1893.      ASCII  character  string  (which  can  be any text, including the
  1894.      important case of a TECO command string).
  1895.  
  1896.      There are global Q-registers and (in TECO-11) local Q-registers.
  1897.  
  1898.      In every TECO, there are 36 global Q-registers, each of which has
  1899.      a  one-character  name:  A through Z and 0 through 9.  The global
  1900.      Q-registers  are  available  to  all  macro   levels,   including
  1901.      "outside" macros altogether (that is, at prompt level).
  1902.  
  1903.      In TECO-11, there are additionally 36 local Q-registers, each  of
  1904.      which has a two-character name:  .A through .Z and .0 through .9.
  1905.      Effectively,  there  is  a  complete  and  unique  set  of  local
  1906.      Q-registers  available  to  each and every macro level, including
  1907.      prompt level.  TECO automatically  saves  and  restores  a  given
  1908.      macro  level's  local  Q-registers  around  execution of a nested
  1909.      (lower level) macro.  When a macro is invoked via an  Mq  command
  1910.      (where  the  command  is  not  colon-modified,  and q is a global
  1911.      Q-register), the current set of local Q-registers is saved and  a
  1912.      new  set of local Q-registers created.  When the macro exits, its
  1913.      local Q-registers are destroyed and those of  the  calling  macro
  1914.      level  are restored.  (If a fatal error occurs and TECO goes back
  1915.      to prompt level, local Q-registers  from  all  macro  levels  are
  1916.      destroyed and prompt level's set is restored.)
  1917.  
  1918.      (A new set of local Q-registers is not created when  the  command
  1919.      is  colon-modified,  as  in :MA, or when the invoked macro itself
  1920.      resides in a local Q-register, as in M.A -- see Table 5-9C.)
  1921.  
  1922.      Standard TECO                                             PAGE 37
  1923.      Conventions and Structures
  1924.  
  1925.  
  1926.      A local Q-register name can be used in any command that  takes  a
  1927.      Q-register name.
  1928.  
  1929.      Various TECO commands allow the storing and retrieving of numeric
  1930.      values  from the numeric storage areas of the Q-registers.  Other
  1931.      TECO commands allow the storage and retrieval of strings from the
  1932.      text storage areas of the Q-registers.
  1933.  
  1934.  
  1935.  
  1936.      3.3.3 Q-register Push-down List [not in TECO-8]
  1937.  
  1938.      The Q-register pushdown list is a stack that permits the  numeric
  1939.      and text storage areas of Q-registers to be saved (the [ command)
  1940.      and  restored  (the  ]  command).   The  command  sequence  [A ]B
  1941.      replicates  the  text  string and numeric value from Q-register A
  1942.      into Q-register B.  (Note that in TECO-11, macros can be  written
  1943.      to  use  local Q-registers, avoiding the need to save and restore
  1944.      Q-registers via the pushdown list.)
  1945.  
  1946.  
  1947.  
  1948.      3.3.4 Numeric Values and Flags
  1949.  
  1950.      TECO  has  many  special  numeric  values  and  flags  which  are
  1951.      accessible  through TECO commands.  Some of these values, such as
  1952.      the text buffer pointer,  reflect  the  state  of  TECO.   Others
  1953.      control TECO's behavior in various ways.
  1954.  
  1955.      Standard TECO                                             PAGE 38
  1956.      Command String Editing
  1957.  
  1958.  
  1959.                                  CHAPTER 4
  1960.  
  1961.                           COMMAND STRING EDITING
  1962.  
  1963.  
  1964.      4.1 Immediate Action Editing Characters
  1965.  
  1966.      While  you  are  typing  command  strings  at  a  terminal,  TECO
  1967.      considers certain ASCII characters to have special meaning.  Most
  1968.      of the special characters  cause  TECO  to  perform  a  specified
  1969.      function  immediately,  without  waiting  for  the double <DELIM>
  1970.      which  normally  be  required  to  terminate  a  command  string.
  1971.      Immediate  action  editing characters may be entered at any point
  1972.      in a command string - even in the middle of  a  command  or  text
  1973.      argument.
  1974.  
  1975.      Many immediate action editing characters, such as <DELETE> (which
  1976.      deletes  the  immediately preceding character), cannot be used as
  1977.      regular TECO commands.  For instance, if  you  enter  a  <DELETE>
  1978.      into  a  command string which is to be later executed as a macro,
  1979.      the <DELETE> will not delete a character as part the execution of
  1980.      the macro.
  1981.  
  1982.      Some characters, like <CTRL/U>, are both  regular  TECO  commands
  1983.      and  immediate  action  commands.   The  command  string ^Uqtext`
  1984.      enters the specified text into Q-register q.   However,  <CTRL/U>
  1985.      typed  while  entering  a  command  string is an immediate action
  1986.      editing character which  deletes  the  current  line.   Thus  you
  1987.      cannot  type  a  <CTRL/U> (or any similar sequence) directly into
  1988.      TECO as part of a  command  string.   Nevertheless,  <CTRL/U>  is
  1989.      still  a valid TECO command;  should TECO encounter it in a macro
  1990.      or  indirect  file,  it  will  have  its  regular   TECO   effect
  1991.      (^Uqtext`).
  1992.  
  1993.      Control characters used as immediate  action  editing  characters
  1994.      must  be  entered  using  the  CONTROL  key;   they  will  not be
  1995.      recognized if entered in their caret or up-arrow form.
  1996.  
  1997.      Table 4-1 lists  the  immediate  action  editing  characters  and
  1998.      explains their functions.
  1999.  
  2000.      Standard TECO                                             PAGE 39
  2001.      Command String Editing
  2002.  
  2003.  
  2004.               TABLE 4-1: IMMEDIATE ACTION EDITING CHARACTERS
  2005.  
  2006.      These characters take immediate effect and are  used  to  edit  a
  2007.      command string as it is being entered:
  2008.  
  2009.      CHARACTER      EXPLANATION
  2010.  
  2011.      <DELIM><DELIM>
  2012.                     The double <DELIM> character sequence  tells  TECO
  2013.                     to  begin  execution  of  the  command string just
  2014.                     typed in.   It  inserts  two  <ESCAPE>s  into  the
  2015.                     command  string.   (<DELIM>  may  be  generated by
  2016.                     pressing a  key  designated  by  the  user  as  an
  2017.                     "ESCape surrogate" or by pressing an actual ESCape
  2018.                     key.  In the former case, ``  is  echoed;   if  no
  2019.                     ESCape   surrogate  has  been  designated,  $$  is
  2020.                     echoed.  See the EE flag  and  the  8192  ET  bit,
  2021.                     section 5.16, for more information.)
  2022.  
  2023.                     The two <DELIM>s must be typed  successively.   If
  2024.                     any  other  character  is typed in between the two
  2025.                     <DELIM>s (even if subsequently DELETEd), then  the
  2026.                     two  <DELIM>s  might  be  treated  simply  as  two
  2027.                     <DELIM>s to be entered  into  the  command  string
  2028.                     rather than as an immediate action command.
  2029.  
  2030.                     If you need to enter two <DELIM>s into  a  command
  2031.                     line,  as  in  the  case where you want to use the
  2032.                     FSstring`` command to delete  a  string,  you  can
  2033.                     keep  TECO  from  recognizing  ``  as an immediate
  2034.                     action               command.                 Type
  2035.                     <DELIM><SPACE><DELETE><DELIM>  and  then  continue
  2036.                     entering the remainder of your command string.
  2037.  
  2038.                     A  single  <DELIM>  character  can  also   be   an
  2039.                     immediate  action  command (when typed immediately
  2040.                     after TECO's prompting asterisk, see section 4.2).
  2041.                     Elsewhere,  a single <DELIM> performs no immediate
  2042.                     action.
  2043.  
  2044.      <DELETE>       Typing a DELETE character (DEL or RUBOUT  on  some
  2045.                     terminals)   deletes  the  last  character  typed.
  2046.                     DELETE can be typed repeatedly to  erase  multiple
  2047.                     characters.   TECO  echoes  the  deleted character
  2048.                     whenever a DELETE is typed, indicating to you that
  2049.                     the  character  has  been  rubbed out.  If you are
  2050.                     doing your editing on a scope terminal,  then  the
  2051.                     action  of  this  key is different:  the character
  2052.                     that has been rubbed out will disappear  from  the
  2053.                     screen  of  your  editing  terminal and the cursor
  2054.                     will be moved back one position.
  2055.  
  2056.                     If you delete a line feed, form feed, or  vertical
  2057.  
  2058.      Standard TECO                                             PAGE 40
  2059.      Command String Editing
  2060.  
  2061.  
  2062.                     tab,  the  cursor  will  move  up  the  screen and
  2063.                     position itself  at  the  end  of  the  text  that
  2064.                     immediately  preceded the line feed, form feed, or
  2065.                     vertical tab.
  2066.  
  2067.      <CTRL/C>       <CTRL/C> echoes as ^C  (Caret-C)  and  aborts  the
  2068.                     entering  of the command string.  The exact action
  2069.                     of the  <CTRL/C>  key  depends  on  the  operating
  2070.                     system being used (See appendices).
  2071.  
  2072.      <CTRL/U>       <CTRL/U> causes the current line  of  the  current
  2073.                     command  line  to  be  deleted.   TECO  echoes the
  2074.                     character  as  ^U  followed  by  <CR><LF>  and  an
  2075.                     asterisk   prompt.   If  you  are  using  a  scope
  2076.                     terminal, the visible action of typing this key is
  2077.                     different.  The current line physically disappears
  2078.                     from the screen and the cursor is positioned  back
  2079.                     at the beginning of the line.
  2080.  
  2081.      <CTRL/G><CTRL/G>
  2082.                     Typing two consecutive <CTRL/G> characters  causes
  2083.                     all  commands  which  have  been  entered  but not
  2084.                     executed to be erased.  (If  the  terminal  has  a
  2085.                     bell, it will ring.) This command is used to erase
  2086.                     an  entire  command  string.   A  single  <CTRL/G>
  2087.                     character is not a special character.
  2088.  
  2089.      <CTRL/G><space>
  2090.                     <CTRL/G> followed  by  a  space  causes  the  line
  2091.                     currently being entered into the command string to
  2092.                     be retyped.
  2093.  
  2094.      <CTRL/G>*      <CTRL/G> followed by an asterisk  causes  all  the
  2095.                     lines  typed by the user from the last TECO prompt
  2096.                     (the asterisk) to be retyped.
  2097.  
  2098.      <CR>           Typing a carriage return enters a carriage  return
  2099.                     followed  by  a line feed into the command string.
  2100.                     To enter a carriage return without  a  line  feed,
  2101.                     type <CR><DELETE>.
  2102.  
  2103.      <CTRL/Z><CTRL/Z><CTRL/Z>
  2104.                     RSX-11 TECO uses the triple <CTRL/Z> command as an
  2105.                     immediate  action  command.   See  the appropriate
  2106.                     appendix for more details.
  2107.  
  2108.      The <CTRL/Z> character is used as an  end-of-file  terminator  in
  2109.      some  contexts  on some operating systems.  While its presence is
  2110.      usually harmless in disk files, it may  cause  premature  end  of
  2111.      file if the file is copied to other media (e.g., paper tape).
  2112.  
  2113.      Standard TECO                                             PAGE 41
  2114.      Command String Editing
  2115.  
  2116.  
  2117.      4.2 Immediate Action Commands
  2118.  
  2119.                    TABLE 4-2: IMMEDIATE ACTION COMMANDS
  2120.  
  2121.      The following commands take effect if  (and  only  if)  they  are
  2122.      typed  as  the  very  first  keystroke(s)  after  TECO issues its
  2123.      asterisk prompt.
  2124.  
  2125.      The <LF>, <DELIM>,  and  <BS>  commands  are  also  described  in
  2126.      Chapter  1,  where  they  are introduced as "immediate inspection
  2127.      commands".
  2128.  
  2129.      CHARACTER      EXPLANATION
  2130.  
  2131.      ?              If the previous  command  aborted  because  of  an
  2132.                     error,  this  immediate action command causes TECO
  2133.                     to print the erroneous  command  string  from  the
  2134.                     beginning  of  the  current  macro level up to and
  2135.                     including the character that caused the error.
  2136.  
  2137.      /              If TECO has just printed an  error  message,  type
  2138.                     this  immediate  action  command to receive a more
  2139.                     detailed explanation of the error.  (On VAX/VMS, a
  2140.                     HELP  command  is  also  available.   See  section
  2141.                     G.13.)
  2142.                     [In TECO-11, implemented only on VAX/VMS]
  2143.  
  2144.      <LF>           Typing this immediate action command,  line  feed,
  2145.                     as  the first keystroke after TECO's prompt causes
  2146.                     TECO to immediately execute an LT  command.   This
  2147.                     aid  lets you "walk through" a file on a non-scope
  2148.                     terminal.  (If the EV flag is non-zero, then the T
  2149.                     portion of this command is redundant and therefore
  2150.                     is not performed.) If you are  already  positioned
  2151.                     at  the  end  of the text buffer, TECO-11 will not
  2152.                     type out anything.
  2153.                     [Not in TECO-10]
  2154.  
  2155.      <DELIM>        Typing this immediate action command, <DELIM>,  is
  2156.                     synonymous  with  typing the <LF> immediate action
  2157.                     command  (described  above).   This   command   is
  2158.                     available on TECOs offering the ESCAPE surrogate.
  2159.                     [TECO-11 only]
  2160.  
  2161.      <BS>           Typing this immediate action  command,  backspace,
  2162.                     (as  the  first  keystroke  after  TECO's  prompt)
  2163.                     causes TECO to immediately execute a -LT  command.
  2164.                     (If the EV flag is non-zero, then the T portion of
  2165.                     this command is redundant  and  therefore  is  not
  2166.                     performed.)
  2167.                     [Not in TECO-10]
  2168.  
  2169.      ^W             Typing this immediate action command, <CTRL/W>, as
  2170.  
  2171.      Standard TECO                                             PAGE 42
  2172.      Command String Editing
  2173.  
  2174.  
  2175.                     the  first  keystroke  after  TECO's  prompt  when
  2176.                     split-screen scrolling is active  causes  TECO  to
  2177.                     re-paint the buffer display portion of the screen.
  2178.                     (Split-screen scrolling  is  active  when  7:W  is
  2179.                     non-zero.)  This  command is useful if the display
  2180.                     has been "confused" by characters from a broadcast
  2181.                     message  or  type-ahead.   It  is  also  useful in
  2182.                     conjunction with ED's 128 bit (which inhibits  all
  2183.                     automatic scroll display updating).
  2184.                     [TECO-11 only]
  2185.  
  2186.      *q             When  an  asterisk  followed  immediately   by   a
  2187.                     Q-register  name (any alphanumeric character, here
  2188.                     represented by q) is  the  first  keystroke  after
  2189.                     TECO's  prompt,  TECO  places the previous command
  2190.                     string into Q-register q.  [In TECO-8, only the *Z
  2191.                     command  is permitted, and TECO will automatically
  2192.                     type the Z.] Note  that  since  *q  is  itself  an
  2193.                     immediate  action  command,  it  may not be edited
  2194.                     with other immediate action  commands.   In  other
  2195.                     words,   you   can't   use  DELETE  to  delete  an
  2196.                     incorrectly typed *.
  2197.  
  2198.                     [In   TECO-10,   *q   must    be    followed    by
  2199.                     <DELIM><DELIM>.]
  2200.  
  2201.      Standard TECO                                             PAGE 43
  2202.      Command String Editing
  2203.  
  2204.  
  2205.      4.3 Introduction to Macros
  2206.  
  2207.      One of TECO's powerful features is the ability to  execute  ASCII
  2208.      text  stored in a Q-register as a command string.  This is called
  2209.      the "macro" facility, and a command string so stored and executed
  2210.      is called a "macro".
  2211.  
  2212.      A Q-register may be loaded with a macro by any of several  means:
  2213.      directly  from  the  console (via the ^Uq command), by extraction
  2214.      from the text buffer (via the X command), or by  these  or  other
  2215.      Q-register loading commands contained in an indirect file or even
  2216.      in another macro.
  2217.  
  2218.      Particularly handy is the "*" immediate action command, discussed
  2219.      in  a preceding section.  When you type this command as the first
  2220.      character following TECO's asterisk prompt, whatever  immediately
  2221.      preceding  command  you  just  typed at the console is saved in a
  2222.      Q-register.  You can then use that command again (and repeatedly)
  2223.      by using the Mq command.
  2224.  
  2225.      You invoke a macro by using the Mq command, where "q" is the name
  2226.      of the Q-register in which the macro text has been stored.
  2227.  
  2228.      A related facility is that of immediate ESCAPE-sequence commands,
  2229.      which is discussed in the following section.
  2230.  
  2231.      Standard TECO                                             PAGE 44
  2232.      Command String Editing
  2233.  
  2234.  
  2235.      4.4 Immediate ESCAPE-Sequence Commands [TECO-11 only]
  2236.  
  2237.      Certain keys on many newer terminals generate  ESCape  sequences.
  2238.      TECO  provides  a facility by which you can cause the pressing of
  2239.      one of these keys at the prompting asterisk to be interpreted  as
  2240.      an  immediate command.  When this facility is enabled, a key such
  2241.      as one of the cursor control keys can cause TECO  to  immediately
  2242.      execute  commands  (previously  stored  as  a macro).  The single
  2243.      keystroke suffices;  no <DELIM><DELIM> is needed.
  2244.  
  2245.      The 32 bit  in  the  ED  flag  enables  immedate  ESCape-sequence
  2246.      commands.   When ED's 32 bit is non-zero, and the first character
  2247.      TECO  receives  after  its  *  prompt  is   ESCape,   TECO   will
  2248.      automatically  read  further  characters and attempt to decode an
  2249.      ESCape sequence.  The decoded ESCape sequence is resolved into  a
  2250.      pair  of  numeric  values,  which  are  then  passed to the macro
  2251.      residing in global Q-register A.
  2252.  
  2253.      The two numeric values are a type code and a  value  code.   They
  2254.      are passed to the macro in QA by an effective <type>,<value>MA``.
  2255.      The macro in QA can retrieve them by code such as:
  2256.              UA                    ! Save the <value> code in QA !
  2257.              @O!T0,T1,T2,T3!       ! Dispatch on <type> code !
  2258.              !T0!                  ! Type 0 codes come here !
  2259.                QA@O!V0,V1,V2...
  2260.  
  2261.      The <type> and <value> codes are as follows.
  2262.  
  2263.      Type 0 - ESCape followed by a control character
  2264.          The <value> code is the control character's code (0 - 31.)
  2265.  
  2266.      Type 1 - ESCape followed by a letter (e.g., ESC A), -or-
  2267.               ESCape followed by [ then a letter (e.g., ESC [ A), -or-
  2268.               CSI    followed by a letter (e.g., CSI A), -or-
  2269.               ESCape, O, then an uppercase letter (e.g., ESC O A)
  2270.          The <value> code is the letter's ASCII value,
  2271.          trimmed to 5 bits (that is, a value of 0 through 31)
  2272.          Common keys of <type> 1 are:
  2273.               Up arrow      <type> 1    <value> 1
  2274.               Down arrow    <type> 1    <value> 2
  2275.               Left arrow    <type> 1    <value> 4
  2276.               Right arrow   <type> 1    <value> 3
  2277.               PF1           <type> 1    <value> 16
  2278.               PF2           <type> 1    <value> 17
  2279.               PF3           <type> 1    <value> 18
  2280.               PF4           <type> 1    <value> 19
  2281.               ENTER         <type> 1    <value> 13
  2282.  
  2283.      Standard TECO                                             PAGE 45
  2284.      Command String Editing
  2285.  
  2286.  
  2287.      Type 2 - ESCape followed by ? then a letter (e.g., ESC ? p), -or-
  2288.               ESCape, O, then an lowercase letter (e.g., ESC O p)
  2289.          The <value> code is the letter's ASCII value,
  2290.          trimmed to 5 bits (that is, a value of 0 through 31)
  2291.          Common keys of <type> 2 are:
  2292.               Keypad ,      <type> 2    <value> 12
  2293.               Keypad -      <type> 2    <value> 13
  2294.               Keypad .      <type> 2    <value> 14
  2295.               Keypad 0      <type> 2    <value> 16
  2296.               Keypad 1      <type> 2    <value> 17
  2297.               Keypad 2      <type> 2    <value> 18
  2298.               Keypad 3      <type> 2    <value> 19
  2299.               Keypad 4      <type> 2    <value> 20
  2300.               Keypad 5      <type> 2    <value> 21
  2301.               Keypad 6      <type> 2    <value> 22
  2302.               Keypad 7      <type> 2    <value> 23
  2303.               Keypad 8      <type> 2    <value> 24
  2304.               Keypad 9      <type> 2    <value> 25
  2305.  
  2306.      Type 3 - ESCape followed by [ then a digit string then ~ -or-
  2307.               CSI    followed by a digit string then ~
  2308.          The <value> code is the value of the digit string.
  2309.          All of the LK201 keyboard's editing and function
  2310.          keys generate sequences of this format.
  2311.  
  2312.      Standard TECO                                             PAGE 46
  2313.      Command String Editing
  2314.  
  2315.  
  2316.      4.5 Operating System Character Filters
  2317.  
  2318.      In general, TECO accepts any ASCII character, whether encountered
  2319.      in a macro, read from an indirect file, or entered directly via a
  2320.      command string from the terminal.  (Note that  TECOs  other  than
  2321.      TECO-11 strip the eighth bit on command input.) In addition, some
  2322.      operating systems  filter  out  certain  characters  typed  at  a
  2323.      terminal  and do not pass them to TECO.  So that you can be aware
  2324.      of the possible difficulty of entering these characters  directly
  2325.      into  a  TECO  command  string,  we list them below in Table 4-5.
  2326.      Note that these characters are still valid  characters  to  TECO,
  2327.      but  may  have to be entered indirectly, such as by using the nI`
  2328.      command.
  2329.  
  2330.           ^T Note:
  2331.                On some operating  systems,  the  ^T  character  is  an
  2332.                immediate action command (to the operating system), and
  2333.                invokes a one-line status report.
  2334.  
  2335.                Where reference is made below  in  Table  4-5  to  this
  2336.                note, TECO causes the operating system's recognition of
  2337.                ^T to be turned off if TECO  ever  asks  the  user  for
  2338.                input.   The  original state of ^T handling is restored
  2339.                upon exit.  MUNGed TECO macros that never ask the  user
  2340.                for input do not affect the operating system's handling
  2341.                of ^T.
  2342.  
  2343.      Standard TECO                                             PAGE 47
  2344.      Command String Editing
  2345.  
  2346.  
  2347.                     TABLE 4-5:  OPERATING SYSTEM CHARACTER FILTERS
  2348.  
  2349.      SYSTEM         CHARACTER   SYSTEM's USE
  2350.  
  2351.      RT-11          ^A          VT11 support [only if GT ON]
  2352.                     ^B          Background control [F/B systems only]
  2353.                     ^E          VT11 support [only if GT ON]
  2354.                     ^F          Foreground control [F/B systems only]
  2355.                     ^O          Output control
  2356.                     ^Q          Terminal Synchronization
  2357.                     ^S          Terminal Synchronization
  2358.  
  2359.      RSTS/E         ^O          Output control
  2360.                     ^Q          Terminal Synchronization
  2361.                     ^S          Terminal Synchronization
  2362.  
  2363.      VAX/VMS        ^O          Output control
  2364.                     ^Q          Terminal Synchronization
  2365.                     ^S          Terminal Synchronization
  2366.                     ^T          System status (see ^T Note above)
  2367.                     ^X          Cancel Type-ahead
  2368.                     ^Y          Process Interruption
  2369.  
  2370.      RSX-11         ^O          Output control
  2371.                     ^Q          Terminal synchronization
  2372.                     ^S          Terminal synchronization
  2373.                     ^X          Task control [RSX-11D only]
  2374.  
  2375.      TOPS-10        ^C^C        Job interruption
  2376.                     ^O          Output control
  2377.                     ^Q          Terminal synchronization
  2378.                     ^S          Terminal synchronization
  2379.                     ^T          System status
  2380.  
  2381.      TOPS-20        ^C^C        Job interruption
  2382.                     ^O          Output control
  2383.                     ^Q          Terminal synchronization
  2384.                     ^S          Terminal synchronization
  2385.                     ^T          System status
  2386.  
  2387.      OS/8           ^B          Background control [F/B systems only]
  2388.                     ^F          Foreground control [F/B systems only]
  2389.                     ^Y          Reboot indicator [F/B systems only]
  2390.  
  2391.      Standard TECO                                             PAGE 48
  2392.      Command Descriptions
  2393.  
  2394.  
  2395.                                  CHAPTER 5
  2396.  
  2397.  
  2398.                            COMMAND DESCRIPTIONS
  2399.  
  2400.  
  2401.      This chapter presents a detailed description  of  the  full  TECO
  2402.      command  set, functionally organized.  It assumes that the reader
  2403.      is familiar with the elementary TECO commands presented earlier.
  2404.  
  2405.      In the sections following, the letters "m" and "n"  are  used  in
  2406.      command  formats  to represent numerical arguments.  These may be
  2407.      either simple integers or complex expressions.   The  letter  "q"
  2408.      represents any Q-register.
  2409.  
  2410.      Standard TECO                                             PAGE 49
  2411.      File Selection Commands
  2412.  
  2413.  
  2414.      5.1 FILE SPECIFICATION COMMANDS
  2415.  
  2416.      You must specify an input file whenever you want TECO  to  accept
  2417.      text  from  any source other than the terminal.  You must specify
  2418.      an output file whenever you want to make a  permanent  change  to
  2419.      the  input file.  Input and output files are selected by means of
  2420.      file specification commands.
  2421.  
  2422.      File specification formats are operating system dependent and are
  2423.      fully  described  in  the operating characteristics appendices at
  2424.      the end of this manual.
  2425.  
  2426.      Almost  every  editing  job  begins  with  at  least   one   file
  2427.      specification  command.   Additional  file specification commands
  2428.      may  be  executed  during  an  editing  job  whenever   required;
  2429.      however,  TECO  will keep only one input file and one output file
  2430.      selected at a time.
  2431.  
  2432.      TECO-11 recognizes two input and two output "streams" called  the
  2433.      primary  and  secondary  streams.   The  primary input and output
  2434.      streams are initially selected when TECO is invoked.   Most  file
  2435.      selection  commands,  and  all  of  the other TECO commands (page
  2436.      manipulation, etc.), operate  on  the  currently  selected  input
  2437.      and/or output stream.
  2438.  
  2439.      The  following  sections  list  all  of  the  file  specification
  2440.      commands.   Unless  otherwise  noted, all of these commands leave
  2441.      the text buffer unchanged.  Examples of some  of  these  commands
  2442.      appear in Chapter 1.
  2443.  
  2444.  
  2445.      5.1.1 File Opening Commands
  2446.  
  2447.      The following commands are used  to  open  files  for  input  and
  2448.      output:
  2449.  
  2450.  
  2451.                  TABLE 5-1A:  FILE SPECIFICATION COMMANDS
  2452.  
  2453.      COMMAND             FUNCTION
  2454.  
  2455.      EBfilespec`    Edit Backup.  This command is recommended for most
  2456.                     editing   jobs.    It   is   used   for  files  on
  2457.                     file-structured  devices  only.   It   opens   the
  2458.                     specified file for input on the currently selected
  2459.                     input stream  and  for  output  on  the  currently
  2460.                     selected output stream.  The EB command also keeps
  2461.                     the unmodified file (the latest copy of the  input
  2462.                     file)  available  to  the  user;   details of this
  2463.                     process are system dependent (See appendices).
  2464.  
  2465.      ERfilespec`    Edit  Read.   Opens  a  file  for  input  on   the
  2466.                     currently selected input stream.
  2467.  
  2468.      Standard TECO                                             PAGE 50
  2469.      File Opening Commands
  2470.  
  2471.  
  2472.      EWfilespec`    Edit Write.   Opens  a  file  for  output  on  the
  2473.                     currently selected output stream.
  2474.  
  2475.      :EBfilespec`   Executes the EB command,  and  returns  a  numeric
  2476.                     value.   -1  returned indicates success:  the file
  2477.                     is open for input.  A 0  indicates  the  specified
  2478.                     file  could  not be found, and no error message is
  2479.                     generated.  Other errors (e.g.,  hardware  errors,
  2480.                     protection violations, etc.) generate messages and
  2481.                     terminate command execution as usual.
  2482.  
  2483.      :ERfilespec`   Executes the ER command,  and  returns  a  numeric
  2484.                     value.  See the :EB command, above.
  2485.  
  2486.      Standard TECO                                             PAGE 51
  2487.      File Specification Switches
  2488.  
  2489.  
  2490.      5.1.2 File Specification Switches
  2491.  
  2492.      Various  system-dependent  switches  (qualifiers)  of  the   form
  2493.      /SWITCH can be used with the file specification in ER, EW, and EB
  2494.      commands.   These  switches  are  listed  below.    Consult   the
  2495.      operating system specific appendices for further details.
  2496.  
  2497.      In addition, on some systems switches are provided for convenient
  2498.      handling  of  BASIC-PLUS  or  BASIC-PLUS-2 source files which use
  2499.      <LF> or & characters for program line continuation.  See Appendix
  2500.      J for more information.
  2501.  
  2502.  
  2503.                 TABLE 5-1B: SWITCHES ON FILE SPECIFICATIONS
  2504.  
  2505.      System    Switch         Meaning
  2506.  
  2507.      OS/8      /S             Ignore end-of-file (<CTRL/Z>s) on input.
  2508.                               (SUPER TECO mode)
  2509.  
  2510.      RSTS/E    /B             Read and write with unfiltered 8-bit
  2511.                /n             Handle BASIC-PLUS-x line continuation
  2512.                /B+            Handle BASIC-PLUS line continuation
  2513.                /              Same as /B+
  2514.                /B2            Handle BASIC-PLUS-x line continuation
  2515.                /CLUSTERSIZE:n Specifies output file cluster size
  2516.                /MODE:n        Use non-standard open mode
  2517.  
  2518.      VAX/VMS,  /B2            Handle BASIC-PLUS-x line continuation
  2519.      RSX-11    /CR            Implied carriage control
  2520.                /-CR           No (internal) carriage control
  2521.                /FT            FORTRAN carriage control
  2522.                /FTN           Same as /FT
  2523.                /RW            Rewind magtape before opening file
  2524.                /SH            Open the file in shared mode
  2525.                /SHR           Same as /SH
  2526.                /STM           Stream format
  2527.                /VAR           Variable format
  2528.  
  2529.      TOPS-10   /APPEND        Append to existing output file (EW only)
  2530.                /ASCII         File is ASCII
  2531.                /GENLSN        Generate line sequence numbers
  2532.                /NOIN          Don't put user type-in into log file
  2533.                /NONSTD        Open DECtape in non-standard mode
  2534.                /NOOUT         Don't put TECO's type out into log  file
  2535.                               (EL only)
  2536.                /OCTAL         Read file in octal
  2537.                /PROTECT:n     Specify protection code
  2538.                /SIXBIT        Read file in pure SIXBIT
  2539.                /SUPLSN        Suppress line sequence numbers
  2540.  
  2541.  
  2542.      5.1.3 File Close and Exit Commands
  2543.  
  2544.      Standard TECO                                             PAGE 52
  2545.      File Close and Exit Commands
  2546.  
  2547.  
  2548.      The following commands are used to  close  files  and  exit  from
  2549.      TECO:
  2550.  
  2551.  
  2552.                       TABLE 5-1C: FILE CLOSE AND EXIT
  2553.  
  2554.      EC             Moves the contents of the text  buffer,  plus  the
  2555.                     remainder   of  the  current  input  file  on  the
  2556.                     currently selected input stream,  to  the  current
  2557.                     output  file  on  the  currently  selected  output
  2558.                     stream;  then closes those input and output files.
  2559.                     Control  remains  in  TECO.   EC  leaves  the text
  2560.                     buffer empty.
  2561.  
  2562.      EF             Closes the current output file  on  the  currently
  2563.                     selected  output  stream.  The EF command does not
  2564.                     write the current contents of the  buffer  to  the
  2565.                     file before closing it.
  2566.  
  2567.      EG`            Performs the same function as the EC command,  but
  2568.                     then  exits  from  TECO  and  re-executes the last
  2569.                     COMPIL class command (.COMPILE,  .LINK,  .EXECUTE,
  2570.                     etc.)
  2571.                     [Same as EX in TECO-11]
  2572.  
  2573.      EGtext`        Performs the same function as the EC command,  but
  2574.                     then  exits  from  TECO  and  passes "text" to the
  2575.                     operating  system  as  a  command  string  to   be
  2576.                     executed (see appendices).
  2577.  
  2578.      :EGcmd args`   Performs operating system function  "cmd"  passing
  2579.                     that  function  "args" as arguments.  This command
  2580.                     always returns a value as follows:
  2581.  
  2582.                      -1    Function "cmd" successfully performed.
  2583.                       0    Function "cmd" is unsupported.
  2584.                     Other  Function "cmd" attempted, but failed.   The
  2585.                            returned value is the failure status.
  2586.  
  2587.                     There  are  four  functions  that   are   commonly
  2588.                     defined:
  2589.  
  2590.                     INI    Locates the user's  private  initialization
  2591.                            TECO macro.
  2592.                     LIB    Defines the user's private library of  TECO
  2593.                            macros.
  2594.                     MEM    Read/write TECO's last edited file memory.
  2595.                     VTE    Locates the user's  private  scope  editing
  2596.                            TECO macro.
  2597.  
  2598.                     These four functions work as follows:
  2599.  
  2600.                     :EGcmd`       Loads   Q-register   *   with    the
  2601.  
  2602.      Standard TECO                                             PAGE 53
  2603.      File Close and Exit Commands
  2604.  
  2605.  
  2606.                                   requested  information.  If there is
  2607.                                   no  information   (e.g.,   no   user
  2608.                                   private  scope  editing  TECO macro)
  2609.                                   then Q-register * is set to the null
  2610.                                   string.
  2611.  
  2612.                     :EGcmd `      Clears   the   information   holder.
  2613.                                   Subsequent :EGcmd` commands will set
  2614.                                   Q-register * to the null string.
  2615.  
  2616.                     :EGcmd text`  Sets  the  information   holder   to
  2617.                                   "text".  Subsequent :EGcmd` commands
  2618.                                   will set Q-register * to "text".
  2619.  
  2620.                     Consult the appendices for details.
  2621.  
  2622.      EK             Kill the current  output  file  on  the  currently
  2623.                     selected   output  stream.   This  command,  which
  2624.                     purges the output  file  without  closing  it,  is
  2625.                     useful  to abort an undesired edit.  Executing the
  2626.                     EK command after an EW  which  is  superseding  an
  2627.                     existing  file leaves the old file intact.  The EK
  2628.                     command  also  "undoes"  an  EB   command.    (See
  2629.                     appendices for details.)
  2630.  
  2631.      ELfilespec`    Open the specified file for output as a log  file.
  2632.                     Any  currently  open  log file will be closed.  If
  2633.                     the /APPEND switch  is  given,  future  logs  will
  2634.                     append  to  the  file (if it already exists).  The
  2635.                     default is to supersede.  All type-in to TECO  and
  2636.                     all  type  out  from  TECO goes into the log file.
  2637.                     The log file is automatically closed by the EX and
  2638.                     <CTRL/C><CTRL/C> TECO commands.
  2639.                     [TECO-10 only]
  2640.  
  2641.      EX             Performs the same function as the EC command,  but
  2642.                     then  exits  from  TECO.  For safety reasons, this
  2643.                     command is aborted if there is text  in  the  text
  2644.                     buffer  but  no output file is open.  To exit TECO
  2645.                     after just looking at  a  file,  use  the  command
  2646.                     string HKEX.
  2647.  
  2648.      EZfilespec`    This command is useful for outputting to  magtapes
  2649.                     and  DECtapes, on which it initializes (zeros) the
  2650.                     specified output device before switching the ouput
  2651.                     to  the  primary  output stream.  In the case of a
  2652.                     magtape, this command rewinds the magtape to  load
  2653.                     point.   If  the  output  device  is  a disk, this
  2654.                     command works exactly like the EW command.
  2655.                     [TECO-10 only]
  2656.  
  2657.      <CTRL/C>       The   <CTRL/C>   (caret/C)   command    terminates
  2658.                     execution   of  the  current  command  string  and
  2659.  
  2660.      Standard TECO                                             PAGE 54
  2661.      File Close and Exit Commands
  2662.  
  2663.  
  2664.                     returns control to TECO's prompt.  (Under  TECO-8,
  2665.                     the    <CTRL/C>    command   currently   acts   as
  2666.                     <CTRL/C><CTRL/C>.)
  2667.  
  2668.      <CTRL/C><CTRL/C>
  2669.                     The ^C<CTRL/C> command causes an  immediate  abort
  2670.                     and  exit from TECO.  Currently open files are not
  2671.                     necessarily closed.  See the appendices  for  more
  2672.                     details.  Note that the second <CTRL/C> may not be
  2673.                     entered in up-arrow mode.
  2674.  
  2675.  
  2676.      5.1.4 Secondary Stream Commands
  2677.  
  2678.      TECO-11 provides  secondary  input  and  output  streams.   These
  2679.      permit  the  user  to have two input and two output files open at
  2680.      the same time, and to switch processing back  and  forth  between
  2681.      them.   Each stream maintains its file position independently, so
  2682.      that one can read from one stream (for example),  switch  to  the
  2683.      other,  and  then  switch back to the first and resume from where
  2684.      one left off.  In addition, a separate command stream allows  one
  2685.      to  execute  TECO  commands from a file without disturbing either
  2686.      input stream.
  2687.  
  2688.      The following commands manipulate the secondary input and  output
  2689.      streams:
  2690.  
  2691.  
  2692.                    TABLE 5-1D: SECONDARY STREAM COMMANDS
  2693.                         [Not in TECO-8 or TECO-10]
  2694.  
  2695.      Input commands (do not open or close any file;  do not change the
  2696.      text buffer):
  2697.  
  2698.      EP             Switches the input to the secondary input stream.
  2699.  
  2700.      ER`            Switches the input to the primary input stream.
  2701.  
  2702.      Output commands (do not open or close any file;   do  not  change
  2703.      the text buffer):
  2704.  
  2705.      EA             Switches  the  output  to  the  secondary   output
  2706.                     stream.
  2707.  
  2708.      EW`            Switches the output to the primary output stream.
  2709.  
  2710.      Indirect file commands:
  2711.  
  2712.      EIfilespec`    Opens a file as an indirect command file, so  that
  2713.                     any  further TECO requests for terminal input will
  2714.                     come from this  file.   At  end-of-file,  or  upon
  2715.                     TECO's  receipt of any error message, the indirect
  2716.                     command file will be  closed  and  terminal  input
  2717.  
  2718.      Standard TECO                                             PAGE 55
  2719.      Secondary Stream Commands
  2720.  
  2721.  
  2722.                     will  be switched back to the terminal.  Note that
  2723.                     this command only presets where  input  will  come
  2724.                     from;   it  does not "splice" the file's data into
  2725.                     the current command string.
  2726.  
  2727.                     While  end-of-file  closes  the  indirect  command
  2728.                     file, it does not automatically start execution of
  2729.                     commands.  Execution will begin only  upon  TECO's
  2730.                     receipt  of  two  adjacent  <ESC>s.  For instance,
  2731.                     assume that FOO.TEC contains valid TECO  commands,
  2732.                     that it presets a return to your terminal with the
  2733.                     customary EI`, but that it  does  not  contain  an
  2734.                     <ESC><ESC>  pair.   If you type EIFOO``, TECO will
  2735.                     read  in  the  contents  of  FOO.TEC  (building  a
  2736.                     command  string)  and attempt to continue building
  2737.                     the command string by reading from  your  terminal
  2738.                     when  end  of  file  on  FOO.TEC  is  encountered.
  2739.                     Things will appear "very quiet" until it occurs to
  2740.                     you  to type <DELIM><DELIM> and so begin execution
  2741.                     of the (composite) command string.
  2742.  
  2743.                     All commands encountered in the indirect file will
  2744.                     have  their normal TECO meaning (as opposed to any
  2745.                     immediate  action  meaning).    For   example,   a
  2746.                     <CTRL/U>  encountered in an indirect file will not
  2747.                     erase  the  command  line  in  which  it   occurs.
  2748.                     Instead,  it  will be treated as the TECO ^Uqtext`
  2749.                     command.  The only exception to this rule  is  the
  2750.                     <ESC><ESC>  command, which directs TECO to execute
  2751.                     the preceding command string and  then  return  to
  2752.                     the  indirect  file  at  the  point  following the
  2753.                     <ESC><ESC>.  (We can say  <ESC>  explicitly  here,
  2754.                     because  <DELIM>  can be other than ESCape only in
  2755.                     commands typed at the console.)
  2756.  
  2757.      EI`            If  an  indirect  command  file  is  active,  this
  2758.                     command  will  close  it and resume terminal input
  2759.                     from the terminal.  Any portion of the file  after
  2760.                     a  double  <DELIM>  which has not yet been read is
  2761.                     discarded.  This  command  has  no  effect  if  no
  2762.                     indirect file is already open.
  2763.  
  2764.      Standard TECO                                             PAGE 56
  2765.      Wildcard Commands
  2766.  
  2767.  
  2768.      5.1.5 Wildcard Commands
  2769.  
  2770.      TECO-11 supports wild card file processing with a set of  special
  2771.      commands, to allow TECO programs to operate on a set of files.
  2772.  
  2773.  
  2774.                        TABLE 5-1E: WILDCARD COMMANDS
  2775.                         [Not in TECO-8 or TECO-10]
  2776.  
  2777.      ENfilespec`    This  command  presets  the  "wild  card"   lookup
  2778.                     filespec.  It is only a preset;  it does not open,
  2779.                     close, or try to find any file.  The  "wild  card"
  2780.                     lookup  is  the only filespec that can contain any
  2781.                     wild card notations.  See the appendices  for  the
  2782.                     allowed wild fields in each operating system.
  2783.  
  2784.      EN`            Once  the  wild  card  lookup  filespec  has  been
  2785.                     preset,  executing this command will find the next
  2786.                     file that matches  the  preset  wild  card  lookup
  2787.                     filespec  and  will  load the filespec buffer with
  2788.                     that file's name.  The G* command (see Appendix C,
  2789.                     section  C.1.1)  can be used to retrieve the fully
  2790.                     expanded filespec.  When no more occurences of the
  2791.                     wild  card  filespec  exist,  the  ?FNF  error  is
  2792.                     returned.
  2793.  
  2794.      :EN`           Executes the EN` command, and  returns  a  numeric
  2795.                     value.   A  -1 indicates that another match of the
  2796.                     wild card filespec exists and has been loaded into
  2797.                     the  filespec  buffer.   A  0  indicates  no  more
  2798.                     occurences exist.  No error message is generated.
  2799.  
  2800.      The filespec argument to the file selection commands  in  TECO-11
  2801.      can  use  the  string building characters described in Table 5-8A
  2802.      (see  section  5.8).   The  <CTRL/E>Q*  construct,  described  in
  2803.      Appendix C, is especially useful in TECO-11.
  2804.  
  2805.  
  2806.      5.1.6 Direct I/O to Q-Registers
  2807.  
  2808.      TECO-10 provides commands to do I/O  directly  to  and  from  the
  2809.      Q-registers, allowing I/O to bypass the text buffer.
  2810.  
  2811.  
  2812.                    TABLE 5-1F: DIRECT I/O TO Q-REGISTERS
  2813.                         [Not in TECO-8 or TECO-11]
  2814.  
  2815.      EQqfilespec`   Read specified file into Q-register q.  No <NULL>s
  2816.                     or  <FF>s  are  removed from the file, except that
  2817.                     trailing <NULL>s are discarded.  The  only  switch
  2818.                     permitted  on  the filespec in this command is the
  2819.                     /DELETE switch, which causes TECO  to  delete  the
  2820.                     file  after reading it, providing that the file is
  2821.  
  2822.      Standard TECO                                             PAGE 57
  2823.      Direct I/O to Q-Registers
  2824.  
  2825.  
  2826.                     less  than  500  characters  long.   This  command
  2827.                     supports   the  pseudo-device  TMP:,  for  TMPCOR.
  2828.                     Consult the appropriate appendix for details.
  2829.                     [TECO-10 only]
  2830.  
  2831.      E%qfilespec`   Create the specified file.  The  contents  of  the
  2832.                     file  will be the contents of Q-register q with no
  2833.                     <NULL>s deleted.  No switches are permitted on the
  2834.                     filespec  of  this command.  This command supports
  2835.                     the pseudo-device TMP:, for TMPCOR.   Consult  the
  2836.                     appropriate appendix for details.
  2837.                     [TECO-10 only]
  2838.  
  2839.      Standard TECO                                             PAGE 58
  2840.      Page Manipulation Commands
  2841.  
  2842.  
  2843.      5.2 PAGE MANIPULATION COMMANDS
  2844.  
  2845.      The following commands permit text  to  be  read  into  the  text
  2846.      buffer  from  an  input  file  or written from the buffer onto an
  2847.      output file.
  2848.  
  2849.      All of the input commands listed in this table  assume  that  the
  2850.      input  file  is  organized  into  pages  small enough to fit into
  2851.      available memory.  If any page of the input  file  contains  more
  2852.      characters than will fit into available memory, the input command
  2853.      will continue reading characters into the  buffer  until  a  line
  2854.      feed  is  encountered when the buffer is about 3/4 full.  See the
  2855.      appendices for more details.   Special  techniques  for  handling
  2856.      pages  larger than the buffer capacity will be presented later in
  2857.      this chapter.
  2858.  
  2859.  
  2860.                   TABLE 5-2:  PAGE MANIPULATION COMMANDS
  2861.  
  2862.      COMMAND        FUNCTION
  2863.  
  2864.      APPEND commands:
  2865.  
  2866.      A         Appends the next page of the input file to the contents
  2867.                of  the  text  buffer,  thus combining the two pages of
  2868.                text on a single page with  no  intervening  form  feed
  2869.                character.  This command takes no argument.  To perform
  2870.                n Appends, use the n<A> construct.  Note that nA  is  a
  2871.                completely different command.
  2872.  
  2873.      :A        Equivalent to the A command  except  that  a  value  is
  2874.                returned.   -1 is returned if the append succeeded, and
  2875.                0  is  returned  if  the  append  failed  because   the
  2876.                end-of-the-input-file  had  previously been reached (^N
  2877.                flag is -1 at start of this command).
  2878.                [Not in TECO-8]
  2879.  
  2880.      n:A       Appends n lines of text from  the  input  file  to  the
  2881.                contents  of  the text buffer.  The value of n must not
  2882.                be negative.  A value is returned indicating whether or
  2883.                not  there  were in fact n lines remaining in the input
  2884.                file.  -1 is returned if the command succeeded.   0  is
  2885.                returned   if   end-of-file   on  the  input  file  was
  2886.                encountered before all n lines were read in.  Note that
  2887.                the  command  can  succeed and yet read in fewer than n
  2888.                lines in the case that the text buffer fills up.
  2889.                [Not in TECO-8]
  2890.  
  2891.      PAGE Commands:
  2892.  
  2893.      P         Writes the contents of the buffer onto the output file,
  2894.                then  clears  the buffer and reads the next page of the
  2895.                input file into the buffer.  A form feed is appended to
  2896.  
  2897.      Standard TECO                                             PAGE 59
  2898.      Page Manipulation Commands
  2899.  
  2900.  
  2901.                the  output file if the last page read in (with a P, Y,
  2902.                or A command) was terminated with a form feed.
  2903.  
  2904.      :P        Same as the P command except that a value is  returned.
  2905.                -1 is returned if the command succeeded.  0 is returned
  2906.                if the command failed because the  end-of-file  on  the
  2907.                input  file had been reached prior to the initiation of
  2908.                this command.  The command string <:P;>  takes  you  to
  2909.                end of file.
  2910.                [Not in TECO-8]
  2911.  
  2912.      nP        Executes the P command n  times,  where  n  must  be  a
  2913.                non-zero positive integer.
  2914.  
  2915.                In TECO-11 on VAX/VMS, n can be a negative integer (and
  2916.                -P means -1P).  A -nP command will back up n pages.
  2917.  
  2918.      n:P       Executes the :P command n times,  where  n  must  be  a
  2919.                non-zero  positive  integer.   In TECO-11 on VAX/VMS, n
  2920.                can be a negative integer (and -:P means  -1:P).   This
  2921.                command returns 0 when another page could not be backed
  2922.                up because beginning of file had been reached.
  2923.                [Not in TECO-8]
  2924.  
  2925.      PW        Write the contents of the buffer onto the  output  file
  2926.                and  append  a  form feed character.  The buffer is not
  2927.                cleared and the pointer position remains unchanged.
  2928.  
  2929.      nPW       Executes the PW command n times,  where  n  must  be  a
  2930.                non-zero positive integer.
  2931.  
  2932.      m,nPW     Writes the  contents  of  the  buffer  between  pointer
  2933.                positions  m  and n onto the output file.  m and n must
  2934.                be positive integers.  A form feed is not  appended  to
  2935.                this  output,  nor  is the buffer cleared.  The pointer
  2936.                position remains unchanged.
  2937.  
  2938.      m,nP      Equivalent to m,nPW.
  2939.  
  2940.      HPW       Equivalent to the PW command except that  a  form  feed
  2941.                character is not appended to the output.
  2942.  
  2943.      HP        Equivalent to HPW.
  2944.  
  2945.      YANK commands:
  2946.  
  2947.      Y         Clears the text buffer and then reads the next page  of
  2948.                the  input file into the buffer.  Because the Y command
  2949.                DESTROYS the current text buffer, its use can result in
  2950.                the  loss  of data, and is subject to "Yank protection"
  2951.                (see ED flag in section 5.14).
  2952.  
  2953.      -Y        Clears the text buffer and then reads the previous page
  2954.  
  2955.      Standard TECO                                             PAGE 60
  2956.      Page Manipulation Commands
  2957.  
  2958.  
  2959.                of the file being edited back into the buffer.  Because
  2960.                the Y command DESTROYS the current text buffer, its use
  2961.                can result in the loss of data, and is subject to "Yank
  2962.                protection" (see ED flag in section 5.14).
  2963.                [TECO-11 on VAX/VMS only]
  2964.  
  2965.      :Y        Same as the Y command but a value is returned.   -1  is
  2966.                returned  if  the Yank succeeded.  0 is returned if the
  2967.                Yank failed because the end-of-file had been reached on
  2968.                the input file prior to the initiation of this command.
  2969.                [Not in TECO-8]
  2970.  
  2971.      -:Y       Same as the -Y command but a value is returned.  -1  is
  2972.                returned  if  the Yank succeeded.  0 is returned if the
  2973.                Yank failed because the  beginning  of  file  had  been
  2974.                reached   on   the  file  being  edited  prior  to  the
  2975.                initiation of this command.
  2976.                [TECO-11 on VAX/VMS only]
  2977.  
  2978.      EY        Same as  the  Y  command,  but  its  action  is  always
  2979.                permitted   regardless   of   the  value  of  the  Yank
  2980.                Protection bit in the  ED  flag.   Remember  that  Yank
  2981.                DESTROYS  the current buffer;  there's no way to get it
  2982.                back!
  2983.  
  2984.      :EY       Same as the  :Y  command,  but  its  action  is  always
  2985.                permitted   regardless   of   the  value  of  the  Yank
  2986.                protection bit in the  ED  flag.   Remember  that  Yank
  2987.                DESTROYS  the current buffer;  there's no way to get it
  2988.                back!
  2989.                [Not in TECO-8]
  2990.  
  2991.      Standard TECO                                             PAGE 61
  2992.      Buffer Pointer Manipulation Commands
  2993.  
  2994.  
  2995.      5.3 BUFFER POINTER MANIPULATION COMMANDS
  2996.  
  2997.      Table 5-3  describes  all  of  the  buffer  pointer  manipulation
  2998.      commands  These  commands  may  be  used to move the pointer to a
  2999.      position between any two characters in the buffer, but they  will
  3000.      not  move  the  pointer  across a buffer boundary.  If any R or C
  3001.      command  attempts  to  move  the  pointer  backward  beyond   the
  3002.      beginning  of  the  buffer or forward past the end of the buffer,
  3003.      the command is ignored and an error message is printed.  If any L
  3004.      command  attempts to exceed the buffer boundaries, the pointer is
  3005.      positioned at the boundary which would have been exceeded and  no
  3006.      error message is printed.
  3007.  
  3008.  
  3009.              TABLE 5-3:  BUFFER POINTER MANIPULATION COMMANDS
  3010.  
  3011.      COMMAND        FUNCTION
  3012.  
  3013.      CHARACTER commands:
  3014.  
  3015.      C         Advances the pointer forward across one character.
  3016.  
  3017.      nC        Executes the C command n times.  If n is positive,  the
  3018.                pointer  is moved forward across n characters.  If n is
  3019.                negative,  the  pointer  is  moved  backward  across  n
  3020.                characters.   If n is zero, the pointer position is not
  3021.                changed.
  3022.  
  3023.      n:C       Same as nC except that a value  is  returned.   If  the
  3024.                command  succeeded,  -1  is  returned.   If the command
  3025.                failed, the pointer does not move and a value of  0  is
  3026.                returned.
  3027.                [TECO-10 only]
  3028.  
  3029.      :C        Equivalent to 1:C.
  3030.  
  3031.      -C        Equivalent to -1C.
  3032.  
  3033.      JUMP commands:
  3034.  
  3035.      J         Moves the pointer to a position  immediately  preceding
  3036.                the first character in the buffer.  Equivalent to 0J.
  3037.  
  3038.      nJ        Moves the pointer to a position  immediately  following
  3039.                the nth character in the buffer.
  3040.  
  3041.      ZJ        Moves the pointer to a position  immediately  following
  3042.                the last character in the buffer.
  3043.  
  3044.      n:J       Same as the nJ command except that if pointer  position
  3045.                n  is  outside of the buffer, the pointer does not move
  3046.                and  a  value  of  0  is  returned.   If  the   command
  3047.                succeeded, a value of -1 is returned.
  3048.  
  3049.      Standard TECO                                             PAGE 62
  3050.      Buffer Pointer Manipulation Commands
  3051.  
  3052.  
  3053.                [TECO-10 only]
  3054.  
  3055.      LINE commands:
  3056.  
  3057.      L         Advances the  pointer  forward  across  the  next  line
  3058.                terminator  (line feed, vertical tab, or form feed) and
  3059.                positions it at the beginning of the next line.
  3060.  
  3061.      nL        Executes the L command n times.  A positive value of  n
  3062.                advances  the  pointer to the beginning of the nth line
  3063.                following its current position.  A negative value of  n
  3064.                moves the pointer backwards to the beginning of the nth
  3065.                complete line preceding its current position.  If n  is
  3066.                zero, the pointer is moved to the beginning of the line
  3067.                on which it is currently positioned.
  3068.  
  3069.      -L        Equivalent to -1L.
  3070.  
  3071.      REVERSE commands:
  3072.  
  3073.      R         Moves the pointer backward across one character.
  3074.  
  3075.      nR        Executes the R command n times.  If n is positive,  the
  3076.                pointer is moved backward across n characters.  If n is
  3077.                negative,  the  pointer  is  moved  forward  across   n
  3078.                characters.   If n is zero, the position of the pointer
  3079.                is not changed.
  3080.  
  3081.      -R        Equivalent to -1R.
  3082.  
  3083.      n:R       Same as the nR command except that a value is returned.
  3084.                If  the  command  succeeded,  then  a  value  of  -1 is
  3085.                returned.  If  the  command  failed,  then  the  buffer
  3086.                pointer is not moved and a value of 0 is returned.
  3087.                [TECO-10 only]
  3088.  
  3089.      :R        Equivalent to 1:R.
  3090.  
  3091.      Standard TECO                                             PAGE 63
  3092.      Text Type Out Commands
  3093.  
  3094.  
  3095.      5.4 TEXT TYPE OUT COMMANDS
  3096.  
  3097.      Table 5-4 describes the commands used to type out part or all  of
  3098.      the  contents  of  the buffer for examination.  These commands do
  3099.      not move the buffer pointer.
  3100.  
  3101.  
  3102.                     TABLE 5-4:  TEXT TYPE OUT COMMANDS
  3103.  
  3104.      COMMAND        FUNCTION
  3105.  
  3106.      T         Types out the contents of the buffer from  the  current
  3107.                position  of  the  buffer pointer through and including
  3108.                the next line terminator character.
  3109.  
  3110.      nT        Types n lines.  If n is positive,  types  the  n  lines
  3111.                following the current position of the pointer.  If n is
  3112.                negative, types the n lines preceding the pointer.   If
  3113.                n  is  zero,  types the contents of the buffer from the
  3114.                beginning of the line on which the pointer  is  located
  3115.                up to the pointer.
  3116.  
  3117.      -T        Equivalent to -1T.
  3118.  
  3119.      m,nT      Types out the contents of the  buffer  between  pointer
  3120.                positions m and n.
  3121.  
  3122.      .,.+nT    Types out the n characters  immediately  following  the
  3123.                buffer pointer.  n should be greater than zero.
  3124.  
  3125.      .-n,.T    Types the n characters immediately preceding the buffer
  3126.                pointer.  n should be greater than zero.
  3127.  
  3128.      n^T       Types out to the  console  the  character  whose  ASCII
  3129.                value  is  n.  Whatever normal type-out conversions may
  3130.                currently  be  in  effect  and  applicable   (such   as
  3131.                translation  of  control characters to up-arrow format)
  3132.                are done.  The value of n is used modulo 256.
  3133.  
  3134.      n:^T      Outputs to the console the character whose ASCII  value
  3135.                is  n.   Output  is done in "one-shot" binary mode;  no
  3136.                type-out translations are done.  The value of n is used
  3137.                modulo 256.
  3138.                [TECO-11 only]
  3139.  
  3140.      HT        Types out the entire contents of the buffer.
  3141.  
  3142.      V         Types out the current line.  Equivalent to 0TT.
  3143.  
  3144.      nV        Types out n-1 lines on each side of the  current  line.
  3145.                Equivalent to 1-nTnT.
  3146.                [Not in TECO-8]
  3147.  
  3148.      Standard TECO                                             PAGE 64
  3149.      Text Type Out Commands
  3150.  
  3151.  
  3152.      m,nV      Types out m-1 lines before  and  n-1  lines  after  the
  3153.                current line.
  3154.                [Not in TECO-8]
  3155.  
  3156.      ^Atext<CTRL/A>
  3157.                Types "text" on the terminal.  While  the  command  may
  3158.                begin  with  <CTRL/A> or Caret/A, the closing character
  3159.                must be a <CTRL/A>.  A numeric  argument  must  not  be
  3160.                specified with this command.
  3161.  
  3162.      @^A/text/ Equivalent to the ^A command except that the text to be
  3163.                printed  may  be  bracketed  with  any character.  This
  3164.                avoids the need for the closing <CTRL/A>.
  3165.  
  3166.      Standard TECO                                             PAGE 65
  3167.      Text Type Out Commands
  3168.  
  3169.  
  3170.      You may stop or delay the output  of  any  type  out  command  by
  3171.      typing  certain  special characters at the keyboard while TECO is
  3172.      typing out at the terminal (via a  T,  V,  ^A,  or  :G  command).
  3173.      These characters are described in the table below:
  3174.  
  3175.  
  3176.                     TABLE 5-4B: TYPE OUT TIME COMMANDS
  3177.  
  3178.      CHARACTER      FUNCTION
  3179.  
  3180.      <CTRL/O>     Stops the terminal output  of  the  current  command
  3181.                   string.    TECO   continues   to  run  and  to  send
  3182.                   characters   to   the   terminal,   however,   these
  3183.                   characters  are suppressed from actually printing on
  3184.                   the terminal.  You can resume printing characters by
  3185.                   typing  another  <CTRL/O>  while  type  out is being
  3186.                   suppressed.  TECO cancels this suppression the  next
  3187.                   time  that  it  prompts for command string input.  A
  3188.                   TECO macro can cancel the effect of any <CTRL/O>  by
  3189.                   setting  the  16's  bit  in the ET flag (see section
  3190.                   5.16).
  3191.  
  3192.      <CTRL/S>     Freezes the terminal output of the  current  command
  3193.                   string.   TECO  stops running the next time it tries
  3194.                   to output a character to your  terminal,  and  waits
  3195.                   for  you  to type a <CTRL/Q> to indicate that output
  3196.                   should resume.
  3197.  
  3198.      <CTRL/Q>     Causes TECO to resume any type out that  was  frozen
  3199.                   via  use  of  the  <CTRL/S> command described above.
  3200.                   This character has this effect only while typout  is
  3201.                   frozen.   Striking  any  key  other than <CTRL/Q> or
  3202.                   <CTRL/C>  while  type  out  is  frozen   will   have
  3203.                   unpredictable   results;   consult  the  appropriate
  3204.                   operating system manual.
  3205.  
  3206.  
  3207.      Note  that  <CTRL/O>,  <CTRL/Q>,  and  <CTRL/S>  are  legal  TECO
  3208.      commands  as well.  When TECO is not typing on the terminal (when
  3209.      you are entering a command string, for example), these characters
  3210.      do not have the effect described above.  They may be entered into
  3211.      your command string just like any other control character (except
  3212.      under operating systems that filter out these characters).
  3213.  
  3214.      Standard TECO                                             PAGE 66
  3215.      Deletion Commands
  3216.  
  3217.  
  3218.      5.5 DELETION COMMANDS
  3219.  
  3220.      Table 5-5 summarizes the text  deletion  commands,  which  permit
  3221.      deletion  of  single  characters,  groups of adjacent characters,
  3222.      single lines, or groups of adjacent lines.
  3223.  
  3224.  
  3225.                     TABLE 5-5:  TEXT DELETION COMMANDS
  3226.  
  3227.      COMMAND        FUNCTION
  3228.  
  3229.      DELETE commands:
  3230.  
  3231.      D         Delete  the  first  character  following  the   current
  3232.                position of the buffer pointer.
  3233.  
  3234.      nD        Execute the D command n times.  If n is positive, the n
  3235.                characters  following  the current pointer position are
  3236.                deleted.  If n is negative, the n characters  preceding
  3237.                the  current  pointer  position  are  deleted.  If n is
  3238.                zero, the command is ignored.
  3239.  
  3240.      -D        Equivalent to -1D.
  3241.  
  3242.      m,nD      Equivalent to m,nK.
  3243.                [TECO-11 only]
  3244.  
  3245.      n:D       Same as nD but returns a value (-1 if command succeeds,
  3246.                0  if command failed because the range of characters to
  3247.                be deleted fell outside the text buffer).
  3248.                [TECO-10 only]
  3249.  
  3250.      FDtext`   Search for the specified text  string  and  delete  it.
  3251.                (See search commands in section 5.7.)
  3252.                [TECO-10 only]
  3253.  
  3254.      @FD/text/ Equivalent to FDtext` except that the <DELIM> character
  3255.                is not necessary.
  3256.  
  3257.      FR`       Equivalent to -nD where n is the  length  of  the  last
  3258.                insert,  get or search command.  See the description of
  3259.                the FRtext` command in section 5.6 for more details.
  3260.  
  3261.      @FR//     Form of the FR` command that does not  require  use  of
  3262.                the <DELIM> character.
  3263.  
  3264.      KILL commands:
  3265.  
  3266.      K         Deletes the contents of the  buffer  from  the  current
  3267.                position  of  the  buffer pointer through and including
  3268.                the next line terminator character.
  3269.  
  3270.      nK        Executes the K command n times.  If n is positive,  the
  3271.  
  3272.      Standard TECO                                             PAGE 67
  3273.      Deletion Commands
  3274.  
  3275.  
  3276.                n  lines  following  the  current  pointer position are
  3277.                deleted.  If n is negative, the n lines  preceding  the
  3278.                current  pointer  position  are deleted.  If n is zero,
  3279.                the contents of the buffer from the  beginning  of  the
  3280.                line  on which the pointer is located up to the pointer
  3281.                is deleted.  It is not  an  error  if  more  lines  are
  3282.                specified than occur when a boundary of the text buffer
  3283.                is encountered.
  3284.  
  3285.      -K        Equivalent to -1K.
  3286.  
  3287.      m,nK      Deletes the contents  of  the  buffer  between  pointer
  3288.                positions  m  and n.  The pointer moves to the point of
  3289.                the  deletion.   The  ?POP  error   message   (or   its
  3290.                equivalent) is issued if either m or n is out of range.
  3291.  
  3292.      FKtext`   Executes a Stext` command then  deletes  all  the  text
  3293.                from  the  initial  pointer position to the new pointer
  3294.                position.
  3295.                [TECO-10 only]
  3296.  
  3297.      @FK/text/ Equivalent to FKtext` except that  "text"  may  contain
  3298.                any  character,  including  <ESCAPE>,  other  than  the
  3299.                delimiter (shown here as /).
  3300.                [TECO-10 only]
  3301.  
  3302.      HK        Deletes the entire contents of the buffer.
  3303.  
  3304.      Standard TECO                                             PAGE 68
  3305.      Insertion Commands
  3306.  
  3307.  
  3308.      5.6 INSERTION COMMANDS
  3309.  
  3310.      Table 5-6 lists  all  of  the  text  insertion  commands.   These
  3311.      commands  cause the string of characters specified in the command
  3312.      to be inserted into the text buffer at the  current  position  of
  3313.      the buffer pointer.  Following execution of an insertion command,
  3314.      the  pointer  will  be  positioned  immediately  after  the  last
  3315.      character of the insertion.
  3316.  
  3317.      The length of an insertion command is limited  primarily  by  the
  3318.      amount  of  memory  available for command string storage.  During
  3319.      normal editing jobs, it is most convenient to limit insertions to
  3320.      about 10 or 15 lines each.  When command string space is about to
  3321.      run out, TECO will ring the terminal's bell after each  character
  3322.      that  is  typed.   From the time you hear the first warning bell,
  3323.      you have 10 characters to type in order to clean up your  command
  3324.      line.   Attempting  to enter too many characters into the current
  3325.      command string causes unpredictible results to occur  and  should
  3326.      be  avoided.  Use the DELETE key to shorten the command to permit
  3327.      its termination.
  3328.  
  3329.      As explained above in Chapter 4, certain characters are  filtered
  3330.      out by the operating system and/or may perform special functions,
  3331.      and some  characters  are  immediate  action  commands  and  have
  3332.      special  effect.   If you want to insert such characters into the
  3333.      text buffer, use the  nI`  command  described  in  the  following
  3334.      table.   It  will  insert  any  ASCII  character into the buffer,
  3335.      including the special characters that  could  not  ordinarily  be
  3336.      typed at a terminal.
  3337.  
  3338.  
  3339.                     TABLE 5-6:  TEXT INSERTION COMMANDS
  3340.  
  3341.      COMMAND        FUNCTION
  3342.  
  3343.      INSERT commands:
  3344.  
  3345.      Itext`    Where "text" is a string of ASCII characters terminated
  3346.                by  a  <DELIM>.   The  specified text string is entered
  3347.                into the buffer at the current position of the pointer,
  3348.                with  the pointer positioned immediately after the last
  3349.                character of the insertion.
  3350.  
  3351.      nI`       This form of the I command inserts the single character
  3352.                whose  ASCII  code  is n into the buffer at the current
  3353.                position of the buffer pointer.  (n is taken modulo 256
  3354.                in  TECO-11, modulo 128 in other TECOs.) nI` is used to
  3355.                insert characters that are not available on the  user's
  3356.                terminal or special characters such as DELETE which may
  3357.                not be inserted from a terminal  with  the  standard  I
  3358.                command.
  3359.  
  3360.      @I/text/  Equivalent to the I command except that the text to  be
  3361.  
  3362.      Standard TECO                                             PAGE 69
  3363.      Insertion Commands
  3364.  
  3365.  
  3366.                inserted  may  contain ESCAPE characters.  A delimiting
  3367.                character (shown as a  slash  here)  must  precede  and
  3368.                follow the text to be inserted, as described in Section
  3369.                3.1.2 above.
  3370.  
  3371.      n@I//     Equivalent to the nI` command, but does not require the
  3372.                <DELIM> character.
  3373.  
  3374.      <TAB>text` This command is equivalent to  the  I  command  except
  3375.                that  the  <TAB>  is part of the text which is inserted
  3376.                into the buffer.
  3377.  
  3378.      FRtext`   Equivalent to "-nDItext`", where "n" is  obtained  from
  3379.                the  most  recent occurrence of the following:  (a) the
  3380.                length of the most recent string found by a  successful
  3381.                search  command, (b) the length of the most recent text
  3382.                string inserted (including insertions from the FS,  FN,
  3383.                or  FR  commands),  or  (c)  the  length  of the string
  3384.                retrieved by the most recent "G" command.   In  effect,
  3385.                the  last  string  inserted  or  found is replaced with
  3386.                "text", provided that the pointer has not  been  moved.
  3387.                After  execution of this command, the buffer pointer is
  3388.                positioned immediately after "text".
  3389.                [Not in TECO-8]
  3390.  
  3391.      @FR/text/ Equivalent to "FRtext`", except that "text" may contain
  3392.                ESCAPE characters.
  3393.                [Not in TECO-8]
  3394.  
  3395.      nFRtext`  Equivalent  to  "nDItext`".   If  n  is  less  than  0,
  3396.                characters preceding the buffer pointer are deleted and
  3397.                replaced  with  "text".   If  n  is  greater  than   0,
  3398.                characters following the buffer pointer are deleted and
  3399.                replaced with  "text".   In  either  case,  the  buffer
  3400.                pointer  is  left  positioned  immediately after "text"
  3401.                upon completion of this command.
  3402.                [TECO-11 only]
  3403.  
  3404.      n@FR/text/ Equivalent  to  "nFRtext`",  except  that  "text"  may
  3405.                contain ESCAPE characters.
  3406.                [TECO-11 only]
  3407.  
  3408.      m,nFRtext` Equivalent to "m,nDItext`".   The  characters  between
  3409.                buffer  positions m and n are deleted and replaced with
  3410.                "text".   The  buffer  pointer   is   left   positioned
  3411.                immediately   after  "text"  upon  completion  of  this
  3412.                command.
  3413.                [TECO-11 only]
  3414.  
  3415.      m,n@FR/text/ Equivalent to "m,nFRtext`", except that  "text"  may
  3416.                contain ESCAPE characters.
  3417.                [TECO-11 only]
  3418.  
  3419.      Standard TECO                                             PAGE 70
  3420.      Search Commands
  3421.  
  3422.  
  3423.      5.7 SEARCH COMMANDS
  3424.  
  3425.      In many cases, the easiest way to position the buffer pointer  is
  3426.      by  means  of  a  character string search.  Search commands cause
  3427.      TECO to scan through text until a specified string of  characters
  3428.      is  found, and then position the buffer pointer at the end of the
  3429.      string.  A character string search begins at the current position
  3430.      of  the  pointer.   It  proceeds  within  the current buffer in a
  3431.      forward or a reverse direction or through the file in  a  forward
  3432.      direction.   Specifying a negative numeric argument to the search
  3433.      command causes the search to proceed backwards from the pointer.
  3434.  
  3435.      Your last explicitly specified search string is always remembered
  3436.      by  TECO.   If  a  search command is specified with a null search
  3437.      string argument, the last explicitly defined search  string  will
  3438.      be used.  This saves having to retype a complex or lengthy search
  3439.      string on successive search commands.
  3440.  
  3441.      Normally searches are "unbounded" - they search from the  current
  3442.      position  to  the  end  of  the  text  buffer  (or in the case of
  3443.      backwards searches,  until  the  beginning  of  the  buffer).   A
  3444.      bounded  search,  however,  will  only  search  from  the current
  3445.      position to the specified bound limit.  If the search  string  is
  3446.      found   within  the  bound  limits,  the  pointer  is  positioned
  3447.      immediately after the last  character  in  the  string.   If  the
  3448.      string cannot be found, the pointer is left unchanged.
  3449.  
  3450.      A special case of the bounded search occurs when  the  upper  and
  3451.      lower  bound  limits  are  the  same.  In such a case, the search
  3452.      command is called an anchored search, and is used to compare  the
  3453.      search   argument   against   the  character  string  immediately
  3454.      following the text buffer pointer.
  3455.  
  3456.      TECO-8 does not permit backward, bounded, or  anchored  searches.
  3457.      This is a general property and will not be specifically mentioned
  3458.      again in the following tables.
  3459.  
  3460.      Standard TECO                                             PAGE 71
  3461.      Search Commands
  3462.  
  3463.  
  3464.                        TABLE 5-7A:  SEARCH COMMANDS
  3465.  
  3466.      Stext`    Where "text" is a string of characters terminated by  a
  3467.                <DELIM>.  This command searches the text buffer for the
  3468.                next  occurrence  of  the  specified  character  string
  3469.                following  the  current position of the buffer pointer.
  3470.                If the string is found, the pointer is positioned after
  3471.                the  last character in the string.  If it is not found,
  3472.                the pointer is positioned immediately before the  first
  3473.                character in the buffer (i.e., a 0J is executed) and an
  3474.                error message is printed.
  3475.  
  3476.      nStext`   This command searches for the  nth  occurrence  of  the
  3477.                specified  character  string,  where  n is greater than
  3478.                zero.  It is  identical  to  the  S  command  in  other
  3479.                respects.
  3480.  
  3481.      -nStext`  Identical to "nStext`" except that the search  proceeds
  3482.                in  the reverse direction.  If the string is not found,
  3483.                the pointer is positioned immediately before the  first
  3484.                character  in  the  buffer  and  an  error  message  is
  3485.                printed.  If the pointer is positioned at the beginning
  3486.                of  or within an occurrence of the desired string, that
  3487.                occurrence is considered to be  the  first  one  found.
  3488.                Upon  successful  completion, the pointer is positioned
  3489.                after the last character in the string found.
  3490.  
  3491.      -Stext`   Equivalent to -1Stext`.
  3492.  
  3493.      Ntext`    Performs the same function as the S command except that
  3494.                the  search  is  continued  across  page boundaries, if
  3495.                necessary, until the character string is found  or  the
  3496.                end of the input file is reached.  This is accomplished
  3497.                by executing an effective P command after each page  is
  3498.                searched.   If the end of the input file is reached, an
  3499.                error message is printed and it is necessary  to  close
  3500.                the  output file and re-open it as an input file before
  3501.                any further editing may be done on that  file.   The  N
  3502.                command  will not locate a character string which spans
  3503.                a page boundary.
  3504.  
  3505.      -Ntext`   Performs the same function as  the  -S  command  except
  3506.                that  the  search  is continued (backwards) across page
  3507.                boundaries, if necessary, until the character string is
  3508.                found  or  the  beginning  of  the file being edited is
  3509.                reached.
  3510.                [TECO-11 on VAX/VMS only]
  3511.  
  3512.      -nNtext`  This  command  searches   (backwards)   for   the   nth
  3513.                occurrence  of  the  specified character string.  It is
  3514.                identical to the -N command in other respects.
  3515.                [TECO-11 on VAX/VMS only]
  3516.  
  3517.      Standard TECO                                             PAGE 72
  3518.      Search Commands
  3519.  
  3520.  
  3521.      nNtext`   This command searches for the  nth  occurrance  of  the
  3522.                specified  character  string,  where  n must be greater
  3523.                than zero.  It is identical to the N command  in  other
  3524.                respects.
  3525.  
  3526.      _text`    The underscore command is identical to  the  N  command
  3527.                except   that  the  search  is  continued  across  page
  3528.                boundaries by executing effective Y commands instead of
  3529.                P  commands,  so that no output is generated.  Since an
  3530.                underscore search can result in the loss of data, it is
  3531.                aborted  under  the same circumstances as the Y command
  3532.                (see  the  ED  flag  in  section  5.16).    Note   that
  3533.                underscore is backarrow on some terminals.
  3534.  
  3535.      n_text`   This command searches for the  nth  occurrence  of  the
  3536.                specified  character  string,  where  n must be greater
  3537.                than zero.  It is identical to the _ command  in  other
  3538.                respects.
  3539.  
  3540.                In TECO-11 on VAX/VMS, n can be negative, in which case
  3541.                the  search proceeds backwards through each text buffer
  3542.                and through the file being edited.  It terminates  upon
  3543.                the  correct  search  string  match and/or beginning of
  3544.                file.  A -n:_ command returns 0 at beginning of file.
  3545.  
  3546.      E_text`   Same as _text` command except that effective EY (rather
  3547.                than Y) commands are used.  Thus, this command is never
  3548.                aborted and is not controlled by  the  Yank  protection
  3549.                bit  in  the  ED flag.  Remember that Yank DESTROYS the
  3550.                current buffer;  there's no way to get it back!
  3551.  
  3552.      nE_text`  Same  as  n_text`  command  except  that  effective  EY
  3553.                (rather than Y) commands are used.
  3554.  
  3555.      Standard TECO                                             PAGE 73
  3556.      Search Commands
  3557.  
  3558.  
  3559.                     TABLE 5-7B: BOUNDED SEARCH COMMANDS
  3560.  
  3561.      m,nStext` System specific command.  Consult Appendix C.
  3562.  
  3563.      m,nFBtext` Performs the same function as the nStext` command, but
  3564.                m and n (inclusive) serve as bounds for the search.  In
  3565.                order  for  a  search  to  be  successful,  the   first
  3566.                character  to  match  must occur between buffer pointer
  3567.                positions m and n.   The  string  that  is  matched  is
  3568.                permitted to extend beyond the search limits specified,
  3569.                provided that it begins within bounds.   If  m<n,  then
  3570.                the  search  proceeds in a forwards direction.  If m>n,
  3571.                then the search proceeds in the reverse direction.
  3572.  
  3573.      nFBtext`  Performs a bounded search over the next n lines.  If  n
  3574.                is  positive, the search proceeds forward over the next
  3575.                n  lines;   if  n  is  negative  the  search   proceeds
  3576.                backwards  over  the  n preceding lines;  if n is zero,
  3577.                the search proceeds backwards over the portion  of  the
  3578.                line preceding the pointer.
  3579.  
  3580.      FBtext`   Equivalent to 1FBtext`.
  3581.  
  3582.      -FBtext`  Equivalent to -1FBtext`.
  3583.  
  3584.      ::Stext`  Compare command.  The ::S command is not a true search.
  3585.                If  the  characters in the buffer immediately following
  3586.                the current pointer position match the  search  string,
  3587.                the  pointer  is moved to the end of the string and the
  3588.                command returns a value of -1;  i.e., the next  command
  3589.                is  executed with an argument of -1.  If the characters
  3590.                in the buffer do not match the string, the  pointer  is
  3591.                not  moved  and  the  command  returns  a  value  of 0.
  3592.                Identical to ".,.:FBtext`".
  3593.  
  3594.  
  3595.  
  3596.      The search and replace commands listed below  perform  equivalent
  3597.      functions  to  the  search commands listed next to them, but then
  3598.      delete "text1" and replace it with "text2".
  3599.  
  3600.  
  3601.                   TABLE 5-7C: SEARCH AND REPLACE COMMANDS
  3602.  
  3603.                Search & Replace              Search Command
  3604.  
  3605.                FStext1`text2`                Stext1`
  3606.  
  3607.                nFStext1`text2`               nStext1`
  3608.  
  3609.                FNtext1`text2`                Ntext1`
  3610.  
  3611.                nFNtext1`text2`               nNtext1`
  3612.  
  3613.      Standard TECO                                             PAGE 74
  3614.      Search Commands
  3615.  
  3616.  
  3617.                F_text1`text2`                _text1`
  3618.                [not in TECO-10]
  3619.  
  3620.                nF_text1`text2`               n_text1`
  3621.                [Not in TECO-10]
  3622.  
  3623.                FCtext1`text2`                FBtext1`
  3624.  
  3625.                nFCtext1`text2`               nFBtext1`
  3626.  
  3627.                m,nFCtext1`text2`             m,nFBtext1`
  3628.  
  3629.  
  3630.      In addition, the four following commands can be used on TECO-10:
  3631.  
  3632.      FDtext`   Identical to the "FStext``" command.
  3633.                [TECO-10 only]
  3634.  
  3635.      nFDtext`  Identical to the "nFStext``" command.
  3636.                [TECO-10 only]
  3637.  
  3638.      nFKtext`  Searches for the nth following occurrence of "text" and
  3639.                then  deletes all characters in the text buffer between
  3640.                the pointer positions before and after the search.
  3641.                [TECO-10 only]
  3642.  
  3643.      FKtext`   Equivalent to 1FKtext`
  3644.                [TECO-10 only]
  3645.  
  3646.      The FS, F_, and FN commands above can also  be  reverse  searches
  3647.      (n<0)  or  bounded  searches  (m,n argument).  A reverse F_ or FN
  3648.      acts like a reverse S;  that is the search  terminates  when  the
  3649.      beginning of the text buffer is encountered.
  3650.  
  3651.      (In TECO-11 on VAX/VMS, -nFN searches backwards through each text
  3652.      buffer and through the file being edited.  It terminates upon the
  3653.      correct search string match and/or beginning of  file.   A  colon
  3654.      modified reverse search returns 0 at beginning of file.)
  3655.  
  3656.      If a search command is entered without a text argument, TECO will
  3657.      execute the search command as though it had been entered with the
  3658.      same  character  string  argument  as  the  last  search  command
  3659.      entered.  For example, suppose the command "STHE END`" results in
  3660.      an error message, indicating that character string "THE END"  was
  3661.      not  found on the current page.  Entering the command "N`" causes
  3662.      TECO to execute an  N  search  for  the  same  character  string.
  3663.      Although the text argument may be omitted, the command terminator
  3664.      <DELIM> must always be entered.
  3665.  
  3666.      Search commands can make use of the colon modifier  described  in
  3667.      Chapter  3.   The  following examples illustrate use of the colon
  3668.      modifier:
  3669.  
  3670.      Standard TECO                                             PAGE 75
  3671.      Search Commands
  3672.  
  3673.  
  3674.      COMMANDS:      n:Stext`
  3675.                     m,n:Stext`
  3676.                     n:Ntext`
  3677.                     n:_text`
  3678.                     n:FStext1`text2`
  3679.                     m,n:FStext1`text2`
  3680.                     n:FNtext1`text2`
  3681.                        etc.
  3682.  
  3683.      FUNCTION:      In each case, execute the search command.  If  the
  3684.                     search  is successful, execute the next sequential
  3685.                     command with an argument of  -1.   If  the  search
  3686.                     fails,  execute  the next command with an argument
  3687.                     of zero.  If the next command does not  require  a
  3688.                     numeric argument, execute it as it stands.
  3689.  
  3690.  
  3691.  
  3692.      All search commands may also use the @ modifier to use  alternate
  3693.      delimiters,  to allow <ESCAPE> characters in search strings or to
  3694.      avoid the use of <ESCAPE> characters in  command  strings.   Such
  3695.      search commands take the following forms:
  3696.  
  3697.      COMMANDS:      @S/text/
  3698.                     m,n@FB/text/
  3699.                     n@FS/text1/text2/
  3700.                     @:N/text/
  3701.                        etc.
  3702.  
  3703.      Standard TECO                                             PAGE 76
  3704.      Search Arguments
  3705.  
  3706.  
  3707.      5.8 SEARCH ARGUMENTS
  3708.  
  3709.      TECO builds the search string by loading its search string buffer
  3710.      from  the  supplied  search  command argument.  To help you enter
  3711.      special characters or frequently used  character  sequences,  the
  3712.      argument  may  contain special string building characters.  Table
  3713.      5-8A lists the string building characters and their functions.
  3714.  
  3715.      TECO-8 does not support the extended String  Build  functions  or
  3716.      Match  Control  Constructs  that  begin with <CTRL/E>.  This is a
  3717.      general property and  will  not  be  repeated  in  the  following
  3718.      tables.
  3719.  
  3720.      Note that, as explained in Chapter 3, a caret (up-arrow)  may  be
  3721.      used to indicate that the character following it is to be treated
  3722.      as a control character.  Any of the commands below may be entered
  3723.      using  the  caret.  This function of the caret can be disabled by
  3724.      using the ED flag (see 5.16 and appendices).
  3725.  
  3726.  
  3727.                   TABLE 5-8A:  STRING BUILDING CHARACTERS
  3728.  
  3729.      CHARACTER           FUNCTION
  3730.  
  3731.      <CTRL/Q>       A <CTRL/Q> character in a search command  argument
  3732.                     indicates   that   the   character  following  the
  3733.                     <CTRL/Q> is to be used literally rather than as  a
  3734.                     match control character.
  3735.  
  3736.      <CTRL/R>       Same as <CTRL/Q>.
  3737.  
  3738.      <CTRL/V>       A <CTRL/V> character in a search command  argument
  3739.                     indicates   that   the   character  following  the
  3740.                     <CTRL/V> is to be used as the equivalent character
  3741.                     in  the lower case ASCII range (i.e., octal 100 to
  3742.                     137 is treated as octal 140 to 177).
  3743.  
  3744.      <CTRL/V><CTRL/V>
  3745.                     Two successive <CTRL/V>  characters  in  a  string
  3746.                     argument  indicate  to  TECO  that  all  following
  3747.                     alphabetic characters in this  string  are  to  be
  3748.                     converted  to  lower case unless an explicit ^W is
  3749.                     given  to  override  this   state.    This   state
  3750.                     continues  until  the end of the string or until a
  3751.                     ^W^W construct is encountered.
  3752.                     [TECO-10 only]
  3753.  
  3754.      <CTRL/W>       A <CTRL/W> character in a search command  argument
  3755.                     indicates   that   the   character  following  the
  3756.                     <CTRL/W> is to be used as the equivalent character
  3757.                     in  the upper case ASCII range (i.e., octal 140 to
  3758.                     177 is treated as octal 100 to 137).
  3759.  
  3760.      Standard TECO                                             PAGE 77
  3761.      Search Arguments
  3762.  
  3763.  
  3764.      <CTRL/W><CTRL/W>
  3765.                     Two successive <CTRL/W>  characters  indicates  to
  3766.                     TECO  that  all following alphabetic characters in
  3767.                     this string are to  be  converted  to  upper  case
  3768.                     unless  an  explicit ^V is encountered to override
  3769.                     this state.  This state continues until the end of
  3770.                     the   string   or   until   a  ^V^V  construct  is
  3771.                     encountered.
  3772.                     [TECO-10 only]
  3773.  
  3774.      <CTRL/E>Qq     <CTRL/E>Qq indicates that  the  string  stored  in
  3775.                     Q-register  q  is  to  be  used  in  the  position
  3776.                     occupied by the ^EQq  in  the  search  string.   Q
  3777.                     registers are discussed in sections 3.3.2 and 5.9.
  3778.                     [Not in TECO-10]
  3779.  
  3780.      <CTRL/E>Uq     <CTRL/E>Uq  indicates  that  the  character  whose
  3781.                     ASCII  code  is  specified  by the numeric storage
  3782.                     area of Q-register q is to be used in the position
  3783.                     occupied by the ^EUq in the search string.
  3784.                     [TECO-11 only]
  3785.  
  3786.  
  3787.      String build characters are  also  permitted  inside  the  string
  3788.      arguments of the O, EB, ER, EW, and EG commands.
  3789.  
  3790.      TECO executes a search command by attempting to match the  search
  3791.      command  argument character-by-character with some portion of the
  3792.      input file.  There are several special  control  characters  that
  3793.      may  be  used  in  search  command  arguments  to alter the usual
  3794.      matching  process.   Table  5-8B  lists   these   match   control
  3795.      characters and their functions.
  3796.  
  3797.  
  3798.                    TABLE 5-8B:  MATCH CONTROL CHARACTERS
  3799.  
  3800.      CHARACTER           FUNCTION
  3801.  
  3802.      <CTRL/X>       A <CTRL/X> character indicates that this  position
  3803.                     in  the  character  string  may  be any character.
  3804.                     TECO  accepts  any  character  as  a   match   for
  3805.                     <CTRL/X>.
  3806.  
  3807.      <CTRL/S>       A <CTRL/S> character indicates that any  separator
  3808.                     character  is  acceptable  in this position.  TECO
  3809.                     accepts any character that is not a letter  (upper
  3810.                     or  lower  case  A  to Z) or a digit (0 to 9) as a
  3811.                     match for <CTRL/S>.
  3812.  
  3813.      <CTRL/N>x      TECO accepts any character  as  a  match  for  the
  3814.                     <CTRL/N>x  combination  EXCEPT the character which
  3815.                     follows the <CTRL/N>.  <CTRL/N>  can  be  combined
  3816.                     with  other  special characters.  For example, the
  3817.  
  3818.      Standard TECO                                             PAGE 78
  3819.      Search Arguments
  3820.  
  3821.  
  3822.                     combination <CTRL/N><CTRL/E>D means match anything
  3823.                     except a digit in this position.
  3824.  
  3825.      <CTRL/E>A      <CTRL/E>A indicates that any alphabetic  character
  3826.                     (upper or lower case A to Z) is acceptable in this
  3827.                     position.
  3828.  
  3829.      <CTRL/E>B      Same as <CTRL/S>.
  3830.  
  3831.      <CTRL/E>C      <CTRL/E>C indicates that  any  character  that  is
  3832.                     legal   as   part   of  a  symbol  constituent  is
  3833.                     acceptable in this  position.   TECO  accepts  any
  3834.                     letter  (upper or lower case A to Z), any digit (0
  3835.                     to 9), a dot (.), or a dollar sign ($) as a  match
  3836.                     for   <CTRL/E>C.   Additional  characters  may  be
  3837.                     matched  depending  upon  the  operating   system;
  3838.                     consult the appropriate appendix.
  3839.  
  3840.      <CTRL/E>D      <CTRL/E>D indicates that any digit  (0  to  9)  is
  3841.                     acceptable in this position.
  3842.  
  3843.      <CTRL/E>Gq     <CTRL/E>Gq indicates that any character  contained
  3844.                     in  Q-register  q  is acceptable in this position.
  3845.                     For example, if Q-register A contains  "A*:"  then
  3846.                     TECO  accepts  either  A,  *, or :  as a match for
  3847.                     <CTRL/E>GA.
  3848.                     [Not in TECO-10]
  3849.  
  3850.      <CTRL/E>L      <CTRL/E>L indicates that any line terminator (line
  3851.                     feed, vertical tab, or form feed) is acceptable in
  3852.                     the position occupied by <CTRL/E>L in  the  search
  3853.                     string.
  3854.  
  3855.      <CTRL/E>M      <CTRL/E>M indicates that any  non-zero  number  of
  3856.                     occurrences of the immediately following character
  3857.                     or match control construct is acceptable  at  this
  3858.                     position.
  3859.                     [TECO-10 only]
  3860.  
  3861.      <CTRL/E>R      <CTRL/E>R   indicates   that   any    alphanumeric
  3862.                     character  (letter  or  digit as defined above) is
  3863.                     acceptable in this position.
  3864.  
  3865.      <CTRL/E>S      <CTRL/E>S indicates that any  non-null  string  of
  3866.                     spaces  and/or  tabs is acceptable in the position
  3867.                     occupied by <CTRL/E>S.
  3868.  
  3869.      <CTRL/E>V      <CTRL/E>V indicates that any lower case alphabetic
  3870.                     character is acceptable in this position.
  3871.  
  3872.      <CTRL/E>W      <CTRL/E>W indicates that any upper case alphabetic
  3873.                     character is acceptable in this position.
  3874.  
  3875.      Standard TECO                                             PAGE 79
  3876.      Search Arguments
  3877.  
  3878.  
  3879.      <CTRL/E>X      Equivalent to <CTRL/X>.
  3880.  
  3881.      <CTRL/E><nnn>  <CTRL/E><nnn> indicates that the  character  whose
  3882.                     ASCII  octal  code  is  nnn  is acceptable in this
  3883.                     position.
  3884.                     [TECO-10 only]
  3885.  
  3886.      <CTRL/E>[a,b,c,...]
  3887.                     <CTRL/E>[a,b,c,...] indicates that any one of  the
  3888.                     specified   characters   is   acceptable  in  this
  3889.                     position.  One or more characters or  other  match
  3890.                     control constructs are permitted.
  3891.                     [TECO-10 only]
  3892.  
  3893.      TECO-8 uses special symbols to represent  certain  match  control
  3894.      characters  when  they  are displayed by an error message.  These
  3895.      display symbols are:
  3896.  
  3897.           Character      Display
  3898.  
  3899.           ^N             <NOT>
  3900.           ^S             <SEP>
  3901.           ^X             <ANY>
  3902.  
  3903.      Standard TECO                                             PAGE 80
  3904.      Q-registers
  3905.  
  3906.  
  3907.      5.9 Q-REGISTER MANIPULATION
  3908.  
  3909.      TECO provides data storage registers, called Q-registers, each of
  3910.      which  may  be  used  to  store  an  integral  numeric value and,
  3911.      simultaneously,  an  ASCII  character  string.   Q-registers  are
  3912.      described  in section 3.3.2;  this section describes the commands
  3913.      used to load values into and retrieve values from Q-registers.
  3914.  
  3915.      An important kind of character string which may be stored in  the
  3916.      text  portion  of  a Q-register is a TECO command string.  Such a
  3917.      command is known as a macro, and is available for  execution  via
  3918.      the Mq command, described in Table 5-9C below.  (See also section
  3919.      4.4, Immediate ESCape-sequence commands, for a keypad  method  of
  3920.      macro  invocation,  and  section  4.2,  for the *q command, which
  3921.      saves  the   last-typed   command   for   possible   editing   or
  3922.      re-execution.)
  3923.  
  3924.      TECO-10 allows additional Q-registers other than those  described
  3925.      in section 3.3.2.  Consult Appendix I for further details.
  3926.  
  3927.      Table 5-9A lists the  commands  which  permit  characters  to  be
  3928.      loaded into the Q-registers.
  3929.  
  3930.  
  3931.                  TABLE 5-9A:  Q-REGISTER LOADING COMMANDS
  3932.  
  3933.      COMMAND        FUNCTION
  3934.  
  3935.      nUq       Put n in the numeric storage area of Q-register q.
  3936.  
  3937.      m,nUq     Equivalent to the nUqm command.  That is, this  command
  3938.                puts  the  number  n  into  the numeric storage area of
  3939.                Q-register q and then returns the number m as a  value.
  3940.                The  command UAUB is useful at the beginning of a macro
  3941.                to save the two arguments specified on the macro  call.
  3942.                (See the m,nMq command below.)
  3943.  
  3944.      n%q       Add n to the contents of the  number  storage  area  of
  3945.                Q-register q.  The updated contents of Q-register q are
  3946.                also returned as a value  to  be  passed  to  the  next
  3947.                command.
  3948.  
  3949.                If your intent is only to update the  Q-register,  good
  3950.                programming practice suggests following the n%q command
  3951.                with a <DELIM> or ^[ to prevent the returned value from
  3952.                unintentionally affecting the following command.
  3953.  
  3954.      n%q`      Same as n%q but discards the value returned.
  3955.  
  3956.      %q        Equivalent to 1%q.
  3957.  
  3958.      ^Uqstring`
  3959.                This command inserts character string "string" into the
  3960.  
  3961.      Standard TECO                                             PAGE 81
  3962.      Q-registers
  3963.  
  3964.  
  3965.                text  storage  area  of  Q-register q.  When entering a
  3966.                command string from the terminal, you must  specify  ^U
  3967.                using  the caret/U format, since the <CTRL/U> character
  3968.                is the line erase immediate action command.
  3969.  
  3970.      :^Uqstring`
  3971.                This command appends character string "string"  to  the
  3972.                text storage area of Q-register "q".
  3973.                [not in TECO-8]
  3974.  
  3975.      n^Uq`     This form  of  the  ^Uq`  command  inserts  the  single
  3976.                character  whose  ASCII code is n into the text storage
  3977.                area of Q-register "q".  (n  is  taken  modulo  256  in
  3978.                TECO-11, modulo 128 in other TECOs.)
  3979.                [not in TECO-8]
  3980.  
  3981.      n:^Uq`    This form of  the  :^Uq`  command  appends  the  single
  3982.                character  whose  ASCII  code  is n to the text storage
  3983.                area of Q-register "q".  (n  is  taken  modulo  256  in
  3984.                TECO-11, modulo 128 in other TECOs.)
  3985.                [not in TECO-8]
  3986.  
  3987.      @^Uq/string/
  3988.      @:^Uq/string/
  3989.      n@^Uq//
  3990.      n@:^Uq//  Equivalent,   respectively,    to    the    ^Uqstring`,
  3991.                :^Uqstring`,  n^Uq`,  and  n:^Uq` commands, except that
  3992.                alternate delimiters are used and no <DELIM> characters
  3993.                are necessary.
  3994.  
  3995.      nXq       Clear Q-register q and move n lines into it, where n is
  3996.                a  signed  integer.   If  n  is  positive,  the n lines
  3997.                following the current pointer position are copied  into
  3998.                the  text  storage  area  of  Q-register  q.   If  n is
  3999.                negative, the n lines preceding the pointer are copied.
  4000.                If  n  is  zero,  the  contents  of the buffer from the
  4001.                beginning of the line on which the pointer  is  located
  4002.                up to the pointer is copied.  The pointer is not moved.
  4003.                The text is not deleted.
  4004.  
  4005.      Xq        Equivalent to 1Xq.
  4006.  
  4007.      -Xq       Equivalent to -1Xq.
  4008.  
  4009.      m,nXq     Copy  the  contents  of  the  buffer  from  the   m+1th
  4010.                character  through and including the nth character into
  4011.                the text storage area of Q-register q.  M and n must be
  4012.                positive, and m should be less than n.
  4013.  
  4014.      .,.+nXq   Copy the n characters immediately following the  buffer
  4015.                pointer  into the text storage area of Q-register q.  N
  4016.                should be greater than zero.
  4017.  
  4018.      Standard TECO                                             PAGE 82
  4019.      Q-registers
  4020.  
  4021.  
  4022.      .-n,.Xq   Copy the n characters immediately preceeding the buffer
  4023.                pointer  into the text storage area of Q-register q.  N
  4024.                should be greater than zero.
  4025.  
  4026.      n:Xq      Append n lines to Q-register q, where  n  is  a  signed
  4027.                integer with the same functions as n in the nXq command
  4028.                above.  The pointer is not moved.
  4029.                [not in TECO-8]
  4030.  
  4031.                The colon construct for appending to a  Q-register  can
  4032.                be used with all forms of the X command.
  4033.  
  4034.      ]q        Pop from the Q-register push-down list into  Q-register
  4035.                q.    Any   previous   contents  of  Q-register  q  are
  4036.                destroyed.  Both the numeric  and  text  parts  of  the
  4037.                Q-register  are loaded by this command.  The Q-register
  4038.                push-down list is a last-in  first-out  (LIFO)  storage
  4039.                area.   (See  section  3.3.3  for  a description of the
  4040.                push-down list.) This command does not  use  or  affect
  4041.                numeric values.  Numeric values are passed through this
  4042.                command transparently.  This allows macros  to  restore
  4043.                Q-registers and still return numeric values.
  4044.                [Not in TECO-8]
  4045.  
  4046.      :]q       Execute the ]q command and return a numeric  value.   A
  4047.                -1  indicates  that  there  was  another  item  on  the
  4048.                Q-register push-down list to be popped.  A 0  indicates
  4049.                that  the  Q-register  push-down  list  was  empty,  so
  4050.                Q-register q was not modified.
  4051.                [Not in TECO-8]
  4052.  
  4053.      *q        Save last-typed command string.  See section 4.2.
  4054.  
  4055.      Standard TECO                                             PAGE 83
  4056.      Q-registers
  4057.  
  4058.  
  4059.      Table 5-9B lists the commands which permit data to  be  retrieved
  4060.      from the Q-registers.
  4061.  
  4062.  
  4063.                 TABLE 5-9B:  Q-REGISTER RETRIEVAL COMMANDS
  4064.  
  4065.      COMMAND        FUNCTION
  4066.  
  4067.      Qq        Use the integer stored in the number  storage  area  of
  4068.                Q-register q as the argument of the next command.
  4069.  
  4070.      nQq       Return the ASCII value  of  the  (n+1)th  character  in
  4071.                Q-register q.  The argument n must be between 0 and the
  4072.                Q-register's size minus 1.  If n is  out  of  range,  a
  4073.                value   of   -1   is  returned.   Characters  within  a
  4074.                Q-register are numbered the same way that characters in
  4075.                the text buffer are numbered.  The initial character is
  4076.                at character position  0,  the  next  character  is  at
  4077.                character  position 1, etc.  Therefore, if Q-register A
  4078.                contains "xyz", then 0QA will return the ASCII code for
  4079.                "x" and 1QA will return the ASCII code for "y".
  4080.  
  4081.      :Qq       Use the number of characters stored in the text storage
  4082.                area  of  Q-register  q  as  the  argument  of the next
  4083.                command.
  4084.  
  4085.      Gq        Copy  the  contents  of  the  text  storage   area   of
  4086.                Q-register q into the buffer at the current position of
  4087.                the buffer  pointer,  leaving  the  pointer  positioned
  4088.                after the last character copied.
  4089.  
  4090.      :Gq       Print  the  contents  of  the  text  storage  area   of
  4091.                Q-register  q on the terminal.  Neither the text buffer
  4092.                nor the buffer pointer is changed by this command.
  4093.  
  4094.      [q        Copy the contents of the numeric and text storage areas
  4095.                of  Q-register  q  into  the Q-register push-down list.
  4096.                This command does not alter either the numeric or  text
  4097.                storage  areas  of  Q-register  q.   It does not use or
  4098.                affect  numeric  values.   Numeric  values  are  passed
  4099.                through  this command transparently, allowing macros to
  4100.                save temporary Q-registers  and  still  accept  numeric
  4101.                values.   (Note,  however,  macros written to use local
  4102.                Q-registers, available in TECO-11, may be able to avoid
  4103.                saving  and  restoring Q-registers via the the pushdown
  4104.                list.) The command sequence [A ]B replicates  the  text
  4105.                string   and  numeric  value  from  Q-register  A  into
  4106.                Q-register B.
  4107.                [Not in TECO-8]
  4108.  
  4109.      Standard TECO                                             PAGE 84
  4110.      Q-registers
  4111.  
  4112.  
  4113.      Table 5-9C lists the commands which cause macros (strings  stored
  4114.      in Q-registers) to be executed.
  4115.  
  4116.      Macro invocations can be nested recursively;  the limit is set by
  4117.      the amount of pushdown storage TECO has available.
  4118.  
  4119.      In this table only,  a  distinction  is  made  between  a  global
  4120.      Q-register  name  (indicated below by "q") and a local Q-register
  4121.      name (indicated below by ".q").  Elsewhere in  this  manual,  "q"
  4122.      indicates either a global or local Q-register name.
  4123.  
  4124.  
  4125.                   TABLE 5-9C:  MACRO INVOCATION COMMANDS
  4126.  
  4127.      COMMAND        FUNCTION
  4128.  
  4129.      Mq        Execute the contents of the text storage area of global
  4130.                Q-register  q  as  a command string.  In TECO-11, a new
  4131.                set of local Q-registers is created before the macro is
  4132.                invoked.
  4133.  
  4134.      nMq       Execute the Mq command as above, using n as  a  numeric
  4135.                argument  for  the  first  command  contained in global
  4136.                Q-register  q.   In  TECO-11,  a  new  set   of   local
  4137.                Q-registers is created.
  4138.  
  4139.      m,nMq     Execute the Mq command as above, using m,n  as  numeric
  4140.                arguments  for  the  first  command contained in global
  4141.                Q-register  q.   In  TECO-11,  a  new  set   of   local
  4142.                Q-registers is created.
  4143.  
  4144.      :Mq       Execute the contents of the text storage area of global
  4145.                Q-register  q  as  a  command  string.  In TECO-11, the
  4146.                current set of local Q-registers remains  available  to
  4147.                the invoked macro;  no new set is created.
  4148.  
  4149.      n:Mq      Execute the :Mq command as above, using n as a  numeric
  4150.                argument  for  the  first  command  contained in global
  4151.                Q-register  q.   In  TECO-11,  no  new  set  of   local
  4152.                Q-registers is created.
  4153.  
  4154.      m,n:Mq    Execute the :Mq command as above, using m,n as  numeric
  4155.                arguments  for  the  first  command contained in global
  4156.                Q-register  q.   In  TECO-11,  no  new  set  of   local
  4157.                Q-registers is created.
  4158.  
  4159.      M.q       Execute the contents of the text storage area of  local
  4160.                Q-register  .q as a command string.  In TECO-11, no new
  4161.                set of local Q-registers is created.
  4162.  
  4163.      nM.q      Execute the M.q command as above, using n as a  numeric
  4164.                argument  for  the  first  command  contained  in local
  4165.                Q-register  .q.   In  TECO-11,  no  new  set  of  local
  4166.  
  4167.      Standard TECO                                             PAGE 85
  4168.      Q-registers
  4169.  
  4170.  
  4171.                Q-registers is created.
  4172.  
  4173.      m,nM.q    Execute the M.q command as above, using m,n as  numeric
  4174.                arguments  for  the  first  command  contained in local
  4175.                Q-register  .q.   In  TECO-11,  no  new  set  of  local
  4176.                Q-registers is created.
  4177.  
  4178.      :M.q      Execute the contents of the text storage area of  local
  4179.                Q-register  .q as a command string.  In TECO-11, no new
  4180.                set of local Q-registers is created.
  4181.  
  4182.      n:M.q     Execute the :M.q command as above, using n as a numeric
  4183.                argument  for  the  first  command  contained  in local
  4184.                Q-register  .q.   In  TECO-11,  no  new  set  of  local
  4185.                Q-registers is created.
  4186.  
  4187.      m,n:M.q   Execute the :M.q command as above, using m,n as numeric
  4188.                arguments  for  the  first  command  contained in local
  4189.                Q-register  .q.   In  TECO-11,  no  new  set  of  local
  4190.                Q-registers is created.
  4191.  
  4192.      Standard TECO                                             PAGE 86
  4193.      Arithmetic and Expressions
  4194.  
  4195.  
  4196.      5.10 ARITHMETIC AND EXPRESSIONS
  4197.  
  4198.      The numeric argument of a TECO command may consist  of  a  single
  4199.      integer,  any of the characters listed in Table 5-11, the numeric
  4200.      contents of any Q-register, or an arithmetic combination of these
  4201.      elements.   If  an arithmetic expression is supplied as a numeric
  4202.      argument, TECO will  evaluate  the  expression.   All  arithmetic
  4203.      expressions are evaluated from left to right without any operator
  4204.      precedence.  Parentheses may be used to override the normal order
  4205.      of  evaluation  of  an  expression.  If parentheses are used, all
  4206.      operations within the parentheses are performed, left  to  right,
  4207.      before  operations  outside  the parentheses.  Parentheses may be
  4208.      nested, in which  case  the  innermost  expression  contained  by
  4209.      parentheses  will  be  evaluated first.  Table 5-10A lists all of
  4210.      the  arithmetic  operators  that  may  be  used   in   arithmetic
  4211.      expressions.
  4212.  
  4213.  
  4214.                     TABLE 5-10A:  ARITHMETIC OPERATORS
  4215.  
  4216.      OPERATOR  EXAMPLE        FUNCTION
  4217.  
  4218.      +         +2=2      Ignored if used before the first term  in  an
  4219.                          expression.
  4220.  
  4221.      +         5+6=11    Addition, if used between terms.
  4222.  
  4223.      -         -2=-2     Negation, if used before the first term in an
  4224.                          expression.
  4225.  
  4226.      -         8-2=6     Subtraction, if used between terms
  4227.  
  4228.      *         8*2=16    Multiplication.  Used between terms.
  4229.  
  4230.      /         8/3=2     Integer division with loss of the  remainder.
  4231.                          Used between terms.
  4232.  
  4233.      &         12&10=8   Bitwise   logical   AND   of    the    binary
  4234.                          representation   of   the  two  terms.   Used
  4235.                          between the terms.
  4236.  
  4237.      #         12#10=14  Bitwise logical OR of the binary of  the  two
  4238.                          terms.  Used between the terms.
  4239.  
  4240.      ^_        5^_=-6    Unary  one's  complement.   Used   after   an
  4241.                          expression.   This  is  a  TECO  command that
  4242.                          complements its argument.  Strictly speaking,
  4243.                          it is not a unary operator.
  4244.  
  4245.      Standard TECO                                             PAGE 87
  4246.      Arithmetic and Expressions
  4247.  
  4248.  
  4249.             TABLE 5-10B:  CONVERSION AND RADIX CONTROL COMMANDS
  4250.  
  4251.      COMMAND        FUNCTION
  4252.  
  4253.      n=        This command causes the value of n to be output at  the
  4254.                terminal  in  decimal followed by a carriage return and
  4255.                line feed.  Decimal numeric conversion is signed.   For
  4256.                example, the unsigned number 65535 will output as -1 on
  4257.                TECO-11.  TECO's radix is unaltered.
  4258.  
  4259.      n==       This command causes the value of n to be output at  the
  4260.                terminal  in  octal  (base  8)  followed  by a carriage
  4261.                return and line  feed.   Octal  numeric  conversion  is
  4262.                unsigned.    For  example,  the  unsigned  number  8191
  4263.                (decimal) will output as 17777 on TECO-8.  TECO's radix
  4264.                is unaltered.
  4265.  
  4266.      n===      This command causes the value of n to be output at  the
  4267.                terminal   in  hexadecimal  (base  16)  followed  by  a
  4268.                carriage return and line feed.  Hexadecimal  output  is
  4269.                unsigned.  TECO's radix is unaltered.
  4270.                [TECO-11 only]
  4271.  
  4272.      n:=
  4273.      n:==
  4274.      n:===     These commands are equivalent to  n=,  n==,  and  n===,
  4275.                except  that  they leave the carriage positioned at the
  4276.                end of the output.
  4277.  
  4278.      ^O        <CTRL/O> (caret/O) causes all subsequent numeric  input
  4279.                to  be  accepted as octal numbers.  Numeric conversions
  4280.                using the \ or n\ commands will  also  be  octal.   The
  4281.                digits  8  and  9 become illegal as numeric characters.
  4282.                The octal radix will continue to be used until the next
  4283.                ^D command is executed or until TECO's radix is changed
  4284.                by an n^R command.
  4285.                NOTE:   On  TECO-10,  this  command  only  affects  the
  4286.                immediately following digit string.
  4287.  
  4288.      ^D        <CTRL/D> (caret/D) causes all subsequent numeric  input
  4289.                to be accepted as decimal numbers.  This is the initial
  4290.                setting.
  4291.                [Not in TECO-10]
  4292.  
  4293.      ^R        This command returns the binary value of TECO's current
  4294.                radix.
  4295.                [TECO-11 only]
  4296.  
  4297.      n^R       This command sets TECO's radix to the value of  n.   It
  4298.                is  currently  implemented only in TECO-11, where n may
  4299.                only be one of the values 8, 10,  or  16  (representing
  4300.                octal  mode,  decimal mode, or hexadecimal mode).  If n
  4301.                is not  one  of  these  values,  TECO's  radix  remains
  4302.  
  4303.      Standard TECO                                             PAGE 88
  4304.      Arithmetic and Expressions
  4305.  
  4306.  
  4307.                unchanged and the ?IRA error message is produced.
  4308.  
  4309.      \         A backslash  character  which  is  not  preceded  by  a
  4310.                numeric  argument  causes  TECO  to  evaluate the digit
  4311.                string  (if   any)   beginning   with   the   character
  4312.                immediately  following the buffer pointer and ending at
  4313.                the next character that is not valid  for  the  current
  4314.                radix.   The  value becomes the numeric argument of the
  4315.                next command.  The first character may be a digit or  +
  4316.                or  -.   As  the  backslash  command is evaluated, TECO
  4317.                moves the buffer  pointer  to  a  position  immediately
  4318.                following  the  digit  string.   If  there  is no digit
  4319.                string following the pointer, the result  is  zero  and
  4320.                the  pointer  position  remains  unchanged.   Except on
  4321.                TECO-8, the digits 8 and 9 will stop the evaluation  if
  4322.                TECO's current radix is octal.
  4323.  
  4324.      n\        The backslash command preceded by an  argument  inserts
  4325.                the  value  of  n  into  the text buffer at the current
  4326.                position of the pointer, leaving the pointer positioned
  4327.                after  the  last digit of the insertion.  The insertion
  4328.                is either  signed  decimal  (decimal  radix),  unsigned
  4329.                octal    (octal   radix),   or   unsigned   hexadecimal
  4330.                (hexadecimal radix).  Note that \ is a  "bidirectional"
  4331.                command.   n\  inserts  a  string into text while \ (no
  4332.                argument) returns a numeric result.
  4333.  
  4334.      Standard TECO                                             PAGE 89
  4335.      Special Numeric Values
  4336.  
  4337.  
  4338.      5.11 SPECIAL NUMERIC VALUES
  4339.  
  4340.      TECO maintains several internal variables which record conditions
  4341.      within  TECO.   The  variable  name  is equivalent to the current
  4342.      contents of the variable and may be entered as a numeric argument
  4343.      to  TECO  commands.   When  the  command is executed, the current
  4344.      value of the designated variable becomes the numeric argument  of
  4345.      the command.
  4346.  
  4347.      Some of the characters which stand for specific values associated
  4348.      with the text buffer have been introduced earlier in this manual.
  4349.      For example, the dot character (.), which represents the  current
  4350.      pointer  position,  may  be  used in the argument of a T command.
  4351.      The command ".,.+5T" causes the 5 characters following the buffer
  4352.      pointer  to  be  typed  out.   When this command is executed, the
  4353.      number of characters preceding the buffer pointer is  substituted
  4354.      in  each  case  for the "dot".  The addition is then carried out,
  4355.      and the command is executed as though it were of the form "m,nT".
  4356.  
  4357.      Table 5-11 lists all of the characters which have special numeric
  4358.      values.   Any of these characters may be used as numeric argument
  4359.      in place of the value it represents.
  4360.  
  4361.  
  4362.         TABLE 5-11:  CHARACTERS ASSOCIATED WITH NUMERIC QUANTITIES
  4363.  
  4364.      CHARACTER      FUNCTION
  4365.  
  4366.      B         Always equivalent to  zero.   Thus,  B  represents  the
  4367.                position preceding the first character in the buffer.
  4368.  
  4369.      Z         Equivalent  to  the  number  of  characters   currently
  4370.                contained  in  the  buffer.   Thus,  Z  represents  the
  4371.                position following the last character in the buffer.
  4372.  
  4373.      .         Equivalent to the  number  of  characters  between  the
  4374.                beginning of the buffer and the current position of the
  4375.                pointer.  Thus "." represents the current  position  of
  4376.                the pointer.
  4377.  
  4378.      H         Equivalent to the numeric  pair  "B,Z",  or  "from  the
  4379.                beginning  of  the buffer up to the end of the buffer."
  4380.                Thus, H represents the whole buffer.
  4381.  
  4382.      nA        Equivalent to the ASCII code for the .+n+1th  character
  4383.                in  the  buffer (that is, the character to the right of
  4384.                buffer pointer position .+n).  The  expression  -1A  is
  4385.                equivalent   to   the   ASCII  code  of  the  character
  4386.                immediately preceding the pointer and 0A is  equivalent
  4387.                to   the   ASCII  code  of  the  character  immediately
  4388.                following the pointer (the current character).  If  the
  4389.                character  position  referenced lies outside the bounds
  4390.                of the text buffer, this command returns a -1.
  4391.  
  4392.      Standard TECO                                             PAGE 90
  4393.      Special Numeric Values
  4394.  
  4395.  
  4396.      Mq        The Mq  command  (execute  the  contents  of  the  text
  4397.                storage area of Q-register "q" as a command string) may
  4398.                return a numeric value  if  the  last  command  in  the
  4399.                string returns a numeric value and is not followed by a
  4400.                <ESC>.
  4401.  
  4402.      Qq        Equivalent to the value stored in  the  number  storage
  4403.                area of Q-register q.
  4404.  
  4405.      :Qq       Equivalent to the number  of  characters  in  the  text
  4406.                storage area of Q-register q.
  4407.                [Not in TECO-8]
  4408.  
  4409.      \         Backslash is equivalent to the  numeric  value  of  the
  4410.                digit  string in the text buffer at the current pointer
  4411.                position,  interpreted  in  the  current  radix.    The
  4412.                pointer is moved to the end of the digit string.
  4413.  
  4414.      ^B        <CTRL/B> (caret/B) is equivalent to  the  current  date
  4415.                via the following equations:
  4416.  
  4417.                OS/8:      ^B = (((month*32)+day)*8)+((year-1970)&7)+k
  4418.                                where k = 4096 if year>1977
  4419.                                and k=0 otherwise
  4420.                RT-11:     ^B = (((month*32)+day)*32)+year-1972
  4421.                RSTS/E:    ^B = ((year-1970)*1000)+day within year
  4422.                RSX-11:    ^B = ((year-1900)*16+month)*32+day
  4423.                VAX/VMS:   ^B = ((year-1900)*16+month)*32+day
  4424.                TOPS-10:   ^B = (((year-1964)*12+month-1)*31+day-1)
  4425.  
  4426.      ^E        <CTRL/E> (caret/E) determines  whether  or  not  the  P
  4427.                command  (and related operations) append a form feed to
  4428.                the contents of the buffer on output.  If ^E is  -1,  a
  4429.                form  feed  is  appended;   if ^E is 0, no form feed is
  4430.                appended.
  4431.  
  4432.                Each time text is read into the text buffer  TECO  sets
  4433.                the ^E flag.  If the text read terminated due to a form
  4434.                feed (i.e., if  the  text  buffer  was  loaded  with  a
  4435.                "complete  page"),  ^E  is set to -1.  If the text read
  4436.                terminated because the buffer was  filled  to  capacity
  4437.                before a form feed was encountered or because there was
  4438.                no form feed (i.e., the text buffer was not loaded with
  4439.                a "complete page"), ^E is set to 0.
  4440.  
  4441.                In TECO-11, you can set the ^E flag's  value  directly,
  4442.                overriding  the  value  set  by  the most recent buffer
  4443.                read.  Be sure to use only values of 0  or  -1;   other
  4444.                values may cause unpredictable results.
  4445.  
  4446.      ^F        <CTRL/F> (caret/F) is equivalent to the  current  value
  4447.                of the console switch register.
  4448.  
  4449.      Standard TECO                                             PAGE 91
  4450.      Special Numeric Values
  4451.  
  4452.  
  4453.      n^F       n<CTRL/F> is the terminal number  plus  200000  (octal)
  4454.                for job n's terminal.  -1^F is the terminal number plus
  4455.                200000 (octal) for your job's terminal.  The result  is
  4456.                0  if  the  specified job is detached or if there is no
  4457.                such job.
  4458.                [TECO-10 only]
  4459.  
  4460.      ^H        <CTRL/H> (caret/H) is equivalent to the current time of
  4461.                day via the following equations:
  4462.  
  4463.                OS/8:      ^H = 0
  4464.                RT-11:     ^H = (seconds since midnight)/2
  4465.                RSTS/E:    ^H = minutes until midnight
  4466.                RSX-11:    ^H = (seconds since midnight)/2
  4467.                VAX/VMS:   ^H = (seconds since midnight)/2
  4468.                TOPS-10:   ^H = 60ths of a second since midnight
  4469.                (or 50ths of a second where 50 Hz power is used)
  4470.  
  4471.      ^N        <CTRL/N> (caret/N) is the end  of  file  flag.   It  is
  4472.                equivalent  to  -1  if  the  file open on the currently
  4473.                selected input stream is  at  end  of  file,  and  zero
  4474.                otherwise.
  4475.  
  4476.      ^S        <CTRL/S> (caret/S) is equivalent to the negative of the
  4477.                length  of  the  last  insert,  string found, or string
  4478.                inserted with a "G" command, whichever  occurred  last.
  4479.                To back up the pointer to the start of the last insert,
  4480.                string found, etc., type "^SC".
  4481.                [Not in TECO-8]
  4482.  
  4483.      ^T        <CTRL/T> (caret/T) is equivalent to the ASCII code  for
  4484.                the  next  character  typed  at the terminal.  Every ^T
  4485.                command executed causes TECO to pause  and  accept  one
  4486.                character  typed  at  the  terminal.   See  the ET flag
  4487.                description (section 5.16) for variations.
  4488.  
  4489.      :^T       Reads and decodes  the  next  keystroke  typed  at  the
  4490.                terminal.   The  decoded  keystroke  is  returned  in a
  4491.                manner  similar  to  that  used  for  immediate  ESCape
  4492.                sequence  commands  (see section 4.4), i.e., via <type>
  4493.                and <value> codes, as follows:
  4494.                     <type> 0   Normal character,
  4495.                                  <value> is ASCII value
  4496.  
  4497.                     <type> 1   Control character
  4498.                                  (except ESCape or CSI);
  4499.                                  <value> is ASCII value of
  4500.                                  control char.
  4501.                                  A typed <CR> yields
  4502.                                  <type> 1 <value> 13,
  4503.                                  and subsequent ^T or :^T
  4504.                                  does not return a <LF>.
  4505.  
  4506.      Standard TECO                                             PAGE 92
  4507.      Special Numeric Values
  4508.  
  4509.  
  4510.                     <type> 2   Same as immed ESC seq <type> 0
  4511.                     <type> 3   Same as immed ESC seq <type> 1
  4512.                     <type> 4   Same as immed ESC seq <type> 2
  4513.                     <type> 5   Same as immed ESC seq <type> 3
  4514.                [TECO-11 only]
  4515.  
  4516.      ^Y        <CTRL/Y> (caret/Y) is equivalent to ".+^S,.",  the  n,m
  4517.                numeric argument spanning the text just searched for or
  4518.                inserted.  This value  may  be  used  to  recover  from
  4519.                inserting  a string in the wrong place.  Type "^YXSFR`"
  4520.                to store the string in Q-register S and remove it  from
  4521.                the  buffer.   You can then position the pointer to the
  4522.                right place and type "GS" to insert the string.
  4523.                [TECO-11 only]
  4524.  
  4525.      ^Z        <CTRL/Z> (caret/Z) is equivalent  to  the  total  space
  4526.                occupied  by  text  in  the  Q-registers (including the
  4527.                command line currently being executed).
  4528.                [TECO-11 only]
  4529.  
  4530.      ^^x       The combination of the Control-caret (double  caret  or
  4531.                double   up-arrow)   followed   by   any  character  is
  4532.                equivalent to the value of  the  ASCII  code  for  that
  4533.                character.    The  "x"  in  this  example  may  be  any
  4534.                character that can be typed in to TECO.
  4535.  
  4536.      Standard TECO                                             PAGE 93
  4537.      Special Numeric Values
  4538.  
  4539.  
  4540.                                  MODE CONTROL FLAGS
  4541.  
  4542.      The following mode control flags return numeric values.  The  use
  4543.                of these flags is described below in section 5.16.
  4544.  
  4545.      ED        Equivalent to the current value of the edit level flag.
  4546.  
  4547.      EH        Equivalent to the current value of the help level flag.
  4548.  
  4549.      EO        Equivalent to the version number of the version of TECO
  4550.                which  is  currently  being run.  This manual describes
  4551.                TECO-11 Version  40,  TECO-8  Version  7,  and  TECO-10
  4552.                Version 3.
  4553.  
  4554.      ES        Equivalent  to  the  current  value   of   the   search
  4555.                verification flag.
  4556.                [Not in TECO-8]
  4557.  
  4558.      ET        Equivalent to the current value of the type out control
  4559.                flag.
  4560.  
  4561.      EU        Equivalent to the current value of the upper/lower case
  4562.                flag.
  4563.  
  4564.      EV        Equivalent to the current  value  of  the  edit  verify
  4565.                flag.
  4566.                [TECO-11 only]
  4567.  
  4568.      ^X        <CTRL/X> (caret/X) is equivalent to the  current  value
  4569.                of the search mode flag.
  4570.                [Not in TECO-8]
  4571.  
  4572.      Standard TECO                                             PAGE 94
  4573.      Command Loops
  4574.  
  4575.  
  4576.      5.12 COMMAND LOOPS
  4577.  
  4578.      You can cause a command string to be executed any number of times
  4579.      by placing the command string within angle brackets and preceding
  4580.      the brackets with a numeric argument designating  the  number  of
  4581.      iterations.   Iterated  command strings are called command loops.
  4582.      Loops may be nested so that one  command  loop  contains  another
  4583.      command  loop,  which, in turn, contains other command loops, and
  4584.      so on.  The maximum depth to which command loops may be nested is
  4585.      determined   by   the  size  of  TECO's  push-down  list  (system
  4586.      dependent), but is always greater than 10.
  4587.  
  4588.      The general form of the command loop is:
  4589.  
  4590.                              n<command string>
  4591.  
  4592.      where "command string" is the sequence of commands to be iterated
  4593.      and  n is the number of iterations.  If n is not supplied then no
  4594.      limit is placed on the number of iterations.  If n is 0  or  less
  4595.      than  0  then  the  iteration  is  not  executed at all;  command
  4596.      control skips to the closing angle bracket.  If n is greater than
  4597.      0, then the iteration is performed n times.
  4598.  
  4599.      Search commands inside command loops are treated specially.  If a
  4600.      search  command  which  is  not  preceded  by a colon modifier is
  4601.      executed within a command loop and the search  fails,  a  warning
  4602.      message  is  printed  [on  TECO-11],  the  command loop is exited
  4603.      immediately and the command following the right angle bracket  of
  4604.      the  loop  is  the next command to be executed.  If an unmodified
  4605.      search command in a command loop is  immediately  followed  by  a
  4606.      semicolon,  it  is  treated as if it were a colon-modified search
  4607.      (see section 5.13).
  4608.  
  4609.      Standard TECO                                             PAGE 95
  4610.      Branching Commands
  4611.  
  4612.  
  4613.      5.13 BRANCHING COMMANDS
  4614.  
  4615.      TECO provides an  unconditional  branch  command  and  a  set  of
  4616.      conditional  execution  commands.   To  branch  within  a command
  4617.      string, you must be able to name  locations  inside  the  string.
  4618.      TECO permits location tags of the form:
  4619.  
  4620.                                    !tag!
  4621.  
  4622.      to be placed between any two commands in a command  string.   The
  4623.      name "tag" will be associated with this location when the command
  4624.      string is  executed.   Tags  may  contain  any  number  of  ASCII
  4625.      characters  and  any character except an exclamation mark.  (When
  4626.      using the @ form  of  this  command,  any  character  except  the
  4627.      delimiter is legal.) Since tags are ignored by TECO except when a
  4628.      branch command references the tagged location, they may  also  be
  4629.      used as comments within complicated command strings.
  4630.  
  4631.      The unconditional branch command is the O command which  has  the
  4632.      form:
  4633.  
  4634.                                    Otag`
  4635.  
  4636.      where "tag" is a location named elsewhere in the  command  string
  4637.      and  "`" signifies a <DELIM>.  When an O command is executed, the
  4638.      next command to be executed will be the one that follows the  tag
  4639.      referenced   by  the  O  command.   Command  execution  continues
  4640.      normally from this point.
  4641.  
  4642.      Use of the O command is subject to two restrictions.   First,  if
  4643.      an  O  command  is  stored  in  a Q-register as part of a command
  4644.      string which  is  to  be  executed  by  an  M  command,  the  tag
  4645.      referenced by the O command must reside in the same Q-register.
  4646.  
  4647.      Second, an O command which is  inside  a  command  loop  may  not
  4648.      branch to a tagged location preceding the command loop.  However,
  4649.      it is always possible to branch  out  of  a  command  loop  to  a
  4650.      location  which  follows  the command loop and then branch to the
  4651.      desired tag.
  4652.  
  4653.      The string argument in the O command has the same format  as  the
  4654.      string  arguments  in  the  search  and E commands.  String build
  4655.      characters such as ^EQq can be  embedded  within  the  string  in
  4656.      TECO-11.   Also,  in  TECO-11  and  TECO-10, the O command may be
  4657.      @-sign modified.  In that case, the syntax of the  command  would
  4658.      be  @O/tag/ where / represents any delimiting character that does
  4659.      not appear within the tag.
  4660.  
  4661.      Branching into a conditional poses  no  problems,  but  branching
  4662.      into a command loop will causes unpredictable results.
  4663.  
  4664.      Although tags may contain any sequence of ASCII characters,  good
  4665.      programming  practice  dictates  that  tags  should  not  contain
  4666.  
  4667.      Standard TECO                                             PAGE 96
  4668.      Branching Commands
  4669.  
  4670.  
  4671.      unusual characters (such as space, comma, ESCAPE, etc.) and  that
  4672.      they  should  be  mnemonic  for  the  piece of code to which they
  4673.      refer.
  4674.  
  4675.      There are many other  branching  commands.   Most  of  these  are
  4676.      considerably  faster  than  the  O  command  and  should  be used
  4677.      wherever convenient.  They are all described in the table below.
  4678.  
  4679.                       TABLE 5-13: BRANCHING COMMANDS
  4680.  
  4681.      COMMAND        FUNCTION
  4682.  
  4683.      Otag`     This  command  causes  TECO  to  branch  to  the  first
  4684.                occurrence  of the specified label (tag) in the current
  4685.                macro level.  In TECO-8 and TECO-11, branching  to  the
  4686.                left  of  the  start  of  the  current iteration is not
  4687.                permitted, and this  command  will  only  look  for  an
  4688.                occurrence  of the specified tag following the < of the
  4689.                current iteration, if you are in an iteration.  In  any
  4690.                case, branching out of an iteration is poor programming
  4691.                practice.   Command  execution  resumes  at  the  first
  4692.                character after the delimiter terminating the specified
  4693.                tag.  Using this syntax, any character except <ESC>  is
  4694.                permitted  in  the tag specification.  The usual string
  4695.                build characters are permitted when specifying the tag.
  4696.  
  4697.      @O/tag/   Equivalent to Otag` except that a delimiter (shown here
  4698.                as  /) is used before and after the specified tag.  Any
  4699.                character other than that delimiter is permitted inside
  4700.                the   tag.   The  usual  string  build  characters  are
  4701.                permitted when specifying the tag.
  4702.                [Not in TECO-8]
  4703.  
  4704.      nOtag0,tag1,tag2,...`
  4705.                This command causes TECO to branch to the tag specified
  4706.                by  the  nth  tag in the accompanying list.  The string
  4707.                argument to this command consists of a sequence of tags
  4708.                separated   by   commas.   The  tags  may  contain  any
  4709.                characters other than comma or  <ESC>;   however,  good
  4710.                programming  practice  suggests  that  the  tags should
  4711.                consist only of letters and digits.  There must  be  no
  4712.                intervening spaces since these would be considered part
  4713.                of the tag.  If n is out of range, or if  n  selects  a
  4714.                null  tag,  then  command  execution continues with the
  4715.                first command following the <DELIM> that delimits  this
  4716.                command.  (A null tag would be signified in the list by
  4717.                two adjacent commas.)
  4718.                [TECO-11 only]
  4719.  
  4720.      n@O/tag0,tag1,tag2,.../
  4721.                Same as the preceding command except that the  list  of
  4722.                tags  is  bracketed  by  a delimiter shown here as "/".
  4723.                The delimiter can be any character that does not appear
  4724.  
  4725.      Standard TECO                                             PAGE 97
  4726.      Branching Commands
  4727.  
  4728.  
  4729.                within  the  list  of tags.  In particular, using comma
  4730.                for the delimiter would not be very useful.
  4731.                [TECO-11 only]
  4732.  
  4733.      ;         This command causes TECO to branch out of  the  current
  4734.                iteration,  if  the  immediately  preceding  search (or
  4735.                search and replace)  command  failed.   In  that  case,
  4736.                control resumes at the character following the matching
  4737.                > at the end of the current iteration.   On  the  other
  4738.                hand,   if  the  preceding  search  succeeded,  command
  4739.                execution continues with the character following the ;.
  4740.                If  this  command  is  encountered  from  outside of an
  4741.                iteration (in the current macro level), then  the  ?SNI
  4742.                error message is issued.
  4743.  
  4744.      n;        This command causes TECO to branch out of  the  current
  4745.                iteration if the value of n is greater than or equal to
  4746.                0.  In that case,  command  execution  resumes  at  the
  4747.                character  following  the  matching > at the end of the
  4748.                current iteration.  On the other hand,  if  n  is  less
  4749.                than  0, command execution continues with the character
  4750.                following the ;.  If this command is  encountered  from
  4751.                outside  of  an iteration (in the current macro level),
  4752.                then the ?SNI error message is issued.
  4753.  
  4754.      :;        This command causes TECO to branch out of  the  current
  4755.                iteration  if  the  immediately  preceding  search  (or
  4756.                search and replace) command succeeded.  In  that  case,
  4757.                control resumes at the character following the matching
  4758.                > at the end of the current iteration.   On  the  other
  4759.                hand, if the preceding search failed, command execution
  4760.                continues with the character following the ;.  If  this
  4761.                command is encountered from outside of an iteration (in
  4762.                the current macro level), then the ?SNI  error  message
  4763.                is issued.
  4764.                [TECO-11 only]
  4765.  
  4766.      n:;       This command causes TECO to branch out of  the  current
  4767.                iteration  if  the  value of n is less than 0.  In that
  4768.                case,  command  execution  resumes  at  the   character
  4769.                following  the  matching  >  at  the end of the current
  4770.                iteration.  On the other hand, if n is greater than  or
  4771.                equal  to  0,  command  execution  continues  with  the
  4772.                character  following  the  ;.   If  this   command   is
  4773.                encountered  from  outside  of  an  iteration  (in  the
  4774.                current macro level), then the ?SNI  error  message  is
  4775.                issued.
  4776.                [TECO-11 only]
  4777.  
  4778.      '         This "command" is actually part of the syntax  of  TECO
  4779.                conditionals.   It  has  no  affect if "executed" other
  4780.                than to signify termination of the current  conditional
  4781.                level.   If  an  argument is specified to this command,
  4782.  
  4783.      Standard TECO                                             PAGE 98
  4784.      Branching Commands
  4785.  
  4786.  
  4787.                the result is not  defined.   (Arguments  pass  through
  4788.                this command on TECO-11.) Conditionals are described in
  4789.                section 5.14.
  4790.  
  4791.      |         This "command" is actually part of the syntax  of  TECO
  4792.                conditionals.  If executed, it causes control to branch
  4793.                to the  end  of  the  conditional.   Command  execution
  4794.                resumes  with  the  character following the ' that ends
  4795.                the current conditional  with  the  ELSE  clause  being
  4796.                skipped.
  4797.  
  4798.      >         This "command" is actually part of the syntax  of  TECO
  4799.                iterations.   If  executed,  it causes TECO to bump the
  4800.                current iteration count by 1 and test  to  see  if  the
  4801.                resulting count is equal to the maximum count permitted
  4802.                for the iteration (specified as an argument before  the
  4803.                matching  <).   If the iteration count has not expired,
  4804.                then control returns to the command following the <  at
  4805.                the   beginning  of  the  current  iteration.   If  the
  4806.                iteration has expired, then command execution continues
  4807.                with  the  character following this >.  If this command
  4808.                is encountered outside  of  an  iteration  (within  the
  4809.                current  macro  level), then the ?BNI error message (or
  4810.                its equivalent) is issued.
  4811.  
  4812.      F>        This command causes TECO to branch (flow) to the end of
  4813.                the   current   iteration.   TECO  effectively  resumes
  4814.                execution at the matching >.  The  iteration  count  is
  4815.                tested  as  usual.   If  it  has  not  expired, control
  4816.                returns back to the start of  the  iteration  with  the
  4817.                count  having  been incremented by 1.  If the count was
  4818.                up, the iteration is exited and control continues  with
  4819.                the  first  command  after  the  >.  If this command is
  4820.                encountered outside of an iteration, it  has  the  same
  4821.                effect as the <DELIM><DELIM> command.
  4822.                [TECO-11 only]
  4823.  
  4824.      F<        This command causes TECO to branch (flow) to the  start
  4825.                of  the  current  iteration.   TECO effectively resumes
  4826.                execution at the first command following the <  at  the
  4827.                beginning  of  the  current  iteration.   The iteration
  4828.                count is not  affected.   If  this  command  is  issued
  4829.                outside  of an iteration, it causes TECO to branch back
  4830.                to the start of the  current  command  string  (in  the
  4831.                current macro level).
  4832.                [TECO-11 only]
  4833.  
  4834.      F'        This command causes TECO to branch (flow) to the end of
  4835.                the  current  conditional.   TECO  effectively  resumes
  4836.                execution at the first command following the '  at  the
  4837.                end  of the current conditional.  Numeric arguments are
  4838.                eaten up by this command.  If this  command  is  issued
  4839.                while  not  in  a  conditional,  the ?MAP error (or its
  4840.  
  4841.      Standard TECO                                             PAGE 99
  4842.      Branching Commands
  4843.  
  4844.  
  4845.                equivalent) is issued.
  4846.                [TECO-11 only]
  4847.  
  4848.      F|        This command causes TECO to branch (flow) to  the  else
  4849.                clause  of  the  current conditional.  TECO effectively
  4850.                resumes execution at the first command following the  |
  4851.                at  the end of the current THEN clause.  If the current
  4852.                conditional has no ELSE clause, or if an unmatched ' is
  4853.                encountered before an unmatched |, then control resumes
  4854.                at the command following the ' .  Numeric arguments are
  4855.                eaten  up  by  this command.  If this command is issued
  4856.                while not in a conditional,  the  ?MAP  error  (or  its
  4857.                equivalent) is issued.  Well-structured programs should
  4858.                not need to use this command.
  4859.                [TECO-11 only]
  4860.  
  4861.      $$        The <ESC><ESC> command causes TECO  to  exit  from  the
  4862.                current  macro  level.   If this command is issued from
  4863.                top level (not from within a macro), then  the  command
  4864.                string  execution  is  terminated  and  TECO returns to
  4865.                prompt level.  Note that the second  <ESC>  must  be  a
  4866.                true  ESCape and may not be a ^[.  Also, note that both
  4867.                ESCapes must be true TECO commands and not part of  the
  4868.                syntax  of  some  previous command.  That is, the first
  4869.                <ESC> does not count if it is the delimiting ESCape  of
  4870.                a string.  Finally, note that these must be real ESCape
  4871.                characters,  and  not   the   user-designated   <DELIM>
  4872.                character  (which  TECO  understands  as an ESCape only
  4873.                when typed at the console).
  4874.  
  4875.      n$$       This command causes TECO to exit from the current macro
  4876.                level,  returning  the number n as a value.  This value
  4877.                will be used as  the  numeric  argument  to  the  first
  4878.                command following the macro call.
  4879.  
  4880.      m,n$$     This command causes TECO to exit from the current macro
  4881.                level,  returning  the  pair  of  values  m  and  n  as
  4882.                arguments to the  first  command  following  the  macro
  4883.                call.  Good programming practice dictates that all ways
  4884.                of exiting a macro return the same number of arguments.
  4885.  
  4886.      ^C        The <CTRL/C> (Caret-C) command when executed as a  TECO
  4887.                command,  causes  command execution to stop and control
  4888.                return to TECO's  prompt.   No  clean-up  of  push-down
  4889.                lists, flag settings, etc.  is done.  This command lets
  4890.                a macro abort TECO's command execution.
  4891.                [On TECO-8 and TECO-10, this command causes control  to
  4892.                return to the operating system.]
  4893.                [On TECO-11, this  command  returns  to  the  operating
  4894.                system if executed from the top level.]
  4895.                Consult the appendices for specific details  concerning
  4896.                your operating system.
  4897.  
  4898.      Standard TECO                                            PAGE 100
  4899.      Branching Commands
  4900.  
  4901.  
  4902.      ^C<CTRL/C>
  4903.                This command causes TECO to unconditionally  abort  and
  4904.                control  exits  from  TECO.   Control  returns  to  the
  4905.                operating system.  The second <CTRL/C> must be  a  true
  4906.                <CTRL/C> and may not be a Caret-C.
  4907.  
  4908.      Standard TECO                                            PAGE 101
  4909.      Conditional Execution Commands
  4910.  
  4911.  
  4912.      5.14 CONDITIONAL EXECUTION COMMANDS
  4913.  
  4914.      All conditonal execution commands are of the form:
  4915.  
  4916.                            n"X command-string '
  4917.         or
  4918.               n"X then-command-string | else-command-string '
  4919.  
  4920.      In the first form of the command, "n" is a  numeric  argument  on
  4921.      which  the  decision  is  based,  "X"  is  any of the conditional
  4922.      execution commands listed in table 5-14, and "command string"  is
  4923.      the  command  string  which  will be executed if the condition is
  4924.      satisfied.   The  numeric  argument   is   separated   from   the
  4925.      conditional  execution  command  by  a  double  quote (") and the
  4926.      command string is terminated with  an  apostrophe  (').   If  the
  4927.      condition  is  not  satisfied,  the  command  string  will not be
  4928.      executed;  execution will continue with the first  command  after
  4929.      the apostrophe.
  4930.  
  4931.      In the second form  of  the  command,  two  command  strings  are
  4932.      specified.   The  first  one  is  executed  if  the  condition is
  4933.      satisfied and the second is executed  if  the  condition  is  not
  4934.      satisfied.   Only  one  of  the command strings will be executed.
  4935.      After execution of the appropriate command string,  control  will
  4936.      continue  with the first command after the apostrophe (unless the
  4937.      command string caused a branch out of the conditional to  occur),
  4938.      since  execution  of  the vertical bar command (|) causes TECO to
  4939.      scan to the next matching apostrophe.
  4940.  
  4941.      Conditional commands are similar to the  IF-THEN-ELSE  constructs
  4942.      that you find in other structured programming languages, although
  4943.      none can match the brevity and elegance of TECO's implementation.
  4944.      Nonetheless,   you   must  use  these  facilities  wisely.   Good
  4945.      programming practice dictates that a branch into the range  of  a
  4946.      conditional (from outside that range) should not occur.
  4947.  
  4948.      Conditional execution commands may be nested in the  same  manner
  4949.      as  iteration  commands.  That is, the command string which is to
  4950.      be executed if the condition on n is met may contain  conditional
  4951.      execution   commands,   which   may,  in  turn,  contain  further
  4952.      conditional execution commands.
  4953.  
  4954.  
  4955.                 TABLE 5-14:  CONDITIONAL EXECUTION COMMANDS
  4956.  
  4957.      COMMAND        FUNCTION
  4958.  
  4959.      n"A       Execute the following command string if  n  equals  the
  4960.                ASCII  code for an alphabetic character (upper or lower
  4961.                case A to Z).
  4962.  
  4963.      n"C       Execute the following command string if n is the  ASCII
  4964.                code  of  any  character  that is a symbol constituent.
  4965.  
  4966.      Standard TECO                                            PAGE 102
  4967.      Conditional Execution Commands
  4968.  
  4969.  
  4970.                This is usually one of the upper or lower case  letters
  4971.                A  to Z, one of the digits 0 to 9, or period, or dollar
  4972.                sign, but may include  additional  characters  on  some
  4973.                operating systems.  Consult the appropriate appendix.
  4974.  
  4975.      n"D       Execute the following command string if  n  equals  the
  4976.                ASCII code for a digit (0 to 9).
  4977.  
  4978.      n"E       Execute the following command string if n is  equal  to
  4979.                zero.
  4980.  
  4981.      n"F       Execute the following command string  if  n  is  FALSE.
  4982.                Equivalent to n"E.
  4983.  
  4984.      n"G       Execute the following command string if  n  is  greater
  4985.                than zero.
  4986.  
  4987.      n"L       Execute the following command string if n is less  than
  4988.                zero.
  4989.  
  4990.      n"N       Execute the following command string if n is not  equal
  4991.                to zero.
  4992.  
  4993.      n"R       Execute the following command string if  n  equals  the
  4994.                ASCII  code  for an alphanumeric (upper or lower case A
  4995.                to Z or 0 to 9).
  4996.  
  4997.      n"S       Execute  the  following  command   string   if   n   is
  4998.                SUCCESSFUL.  Equivalent to n"L.
  4999.  
  5000.      n"T       Execute the following command  string  if  n  is  TRUE.
  5001.                Equivalent to n"L.
  5002.  
  5003.      n"U       Execute  the  following  command   string   if   n   is
  5004.                UNSUCCESSFUL.  Equivalent to n"E.
  5005.  
  5006.      n"V       Execute the following command string if  n  equals  the
  5007.                ASCII code for a lower case alphabetic character (lower
  5008.                case A to Z).
  5009.                [Not in TECO-8]
  5010.  
  5011.      n"W       Execute the following command string if  n  equals  the
  5012.                ASCII  code  for  an  upper  case  alphabetic character
  5013.                (upper case A to Z).
  5014.                [Not in TECO-8]
  5015.  
  5016.      n"<       Identical to n"L
  5017.  
  5018.      n">       Identical to n"G
  5019.  
  5020.      n"=       Identical to n"E
  5021.  
  5022.      Standard TECO                                            PAGE 103
  5023.      Retrieving Environment Characteristics
  5024.  
  5025.  
  5026.      5.15 RETRIEVING ENVIRONMENT CHARACTERISTICS
  5027.  
  5028.      The following TECO commands return values of  interest  to  users
  5029.      who  want  information  about  their  current  job, the operating
  5030.      system, their terminal, etc.
  5031.  
  5032.      All negative EJ commands return  an  operating  system  dependent
  5033.      value.   Consult  the  appendices  for  operating  system  unique
  5034.      commands.
  5035.  
  5036.  
  5037.             TABLE 5-15A: RETREIVING ENVIRONMENT CHARACTERISTICS
  5038.  
  5039.      COMMAND        FUNCTION
  5040.  
  5041.      -1EJ      Return a number representing the computer and operating
  5042.                system  upon  which  TECO  is  currently running.  This
  5043.                value  has  the  form  256m+n  where  m  is  a   number
  5044.                representing  the  computer  in  use  and n is a number
  5045.                representing the  operating  system  that  is  running.
  5046.                Current values of m and n are:
  5047.  
  5048.                          Computer (m)        Operating System (n)
  5049.  
  5050.                          0         PDP-11    0    RSX-11D
  5051.                                              1    RSX-11M
  5052.                                              2    RSX-11S
  5053.                                              3    IAS
  5054.                                              4    RSTS/E
  5055.                                              5    VAX/VMS
  5056.                                                   (compatibility mode)
  5057.                                              6    RSX-11M+
  5058.                                              7    RT-11
  5059.                          1         PDP-8     0    OS/8
  5060.                          2         DEC-10    0    TOPS-10
  5061.                          3         DEC-20    0    TOPS-20
  5062.                          4         VAX-11    0    VAX/VMS
  5063.                                                   (native mode)
  5064.  
  5065.      0EJ       Returns  a  value  equal  to  your  job   number.    On
  5066.                single-user systems, this is always a 0.
  5067.  
  5068.      1EJ       Returns a value equal to your console  keyboard  number
  5069.                (the  keyboard  you  detached  from  if you are running
  5070.                detached).  On single-terminal systems, this is  always
  5071.                a 0.
  5072.  
  5073.      2EJ       Returns a value equal to your operating  system's  user
  5074.                identification  number.   This  may be called your UIC,
  5075.                PPN, Group,  etc.   under  various  operating  systems.
  5076.                Consult the appendices for more information.
  5077.  
  5078.      Standard TECO                                            PAGE 104
  5079.      Retrieving Environment Characteristics
  5080.  
  5081.  
  5082.                     TABLE 5-15B: SETTING ENVIRONMENT INFORMATION
  5083.  
  5084.      n,1EJ     Set the terminal number to receive output.   This  will
  5085.                not  affect  terminal  input.   Your  job  will  remain
  5086.                attached to, or detached from, your terminal, whichever
  5087.                it was before.  Output will only occur if the specified
  5088.                terminal is ASSIGNed with a monitor ASSIGN command (you
  5089.                may  ^C,  issue  that command and continue) and if your
  5090.                job has POKE privileges.  This command  also  sets  the
  5091.                terminal  to  be  reattached  if  the  set  detach flag
  5092.                (64&ET) is cleared.  The reattaching operation requires
  5093.                [1,2] or JACCT privileges.
  5094.                [TECO-10 only]
  5095.  
  5096.      n,2EJ     Sets your [p,pn] to n where n has the  same  format  as
  5097.                the  number  returned  by the 2EJ command.  Issuance of
  5098.                this command requires the appropriate privileges.
  5099.                [TECO-10 only]
  5100.  
  5101.      Standard TECO                                            PAGE 105
  5102.      Mode Control Flags
  5103.  
  5104.  
  5105.      5.16 MODE CONTROL FLAGS
  5106.  
  5107.      TECO has flags which control various aspects  of  its  operation.
  5108.      You  can  find  a flag's current setting by executing its command
  5109.      name without an argument;  the current setting  of  the  flag  is
  5110.      returned  as  a  value.  A flag may be set to a specific value by
  5111.      executing its command name preceded by a numerical argument;  the
  5112.      flag is set to the value of the argument.
  5113.  
  5114.      The following table describes the commands  that  set  and  clear
  5115.      flags;  <flag> represents any of the flags listed below.
  5116.  
  5117.  
  5118.                   TABLE 5-16A: FLAG MANIPULATION COMMANDS
  5119.  
  5120.      <flag>         Return value of flag.
  5121.  
  5122.      n<flag>        Set value of flag to n.
  5123.  
  5124.      m,n<flag>      In the flag, turn off those bits  specified  by  m
  5125.                     and turn on those bits specified by n.
  5126.  
  5127.      0,n<flag>      Turn on the bits in the flag specified by n.
  5128.  
  5129.      m,0<flag>      Turn off the bits in the flag specified by m.
  5130.  
  5131.  
  5132.      The flags have the following functions:
  5133.  
  5134.  
  5135.                      TABLE 5-16B:  MODE CONTROL FLAGS
  5136.  
  5137.      COMMAND             FUNCTION
  5138.  
  5139.      ED        The edit level flag, a bit-encoded word  that  controls
  5140.                TECO's  behavior  in various respects.  Any combination
  5141.                of the individual bits may be set as the user sees fit.
  5142.                The bits have the following functions:
  5143.  
  5144.                ED&1      Allow caret (^) in search strings.   If  this
  5145.                          bit  is clear, a caret (^) in a search string
  5146.                          modifies the immediately following  character
  5147.                          to become a control character.  When this bit
  5148.                          is set, a caret in a search string is  simply
  5149.                          the  literal  character  caret.   If  you are
  5150.                          editing  a  file  that  contains  many  caret
  5151.                          characters  (e.g.,  a  RUNOFF  file with case
  5152.                          control), you will  want  to  set  this  bit.
  5153.                          (For  control of upper/lower case matching in
  5154.                          search strings, see the ^X flag.)
  5155.  
  5156.                ED&2      Allow all Y and _ commands.  If this  bit  is
  5157.                          set,  the  Y (Yank) command and _ (underscore
  5158.  
  5159.      Standard TECO                                            PAGE 106
  5160.      Mode Control Flags
  5161.  
  5162.  
  5163.                          or backarrow) command work unconditionally as
  5164.                          described  earlier  in the manual.  If clear,
  5165.                          the behavior of the  Y  and  _  commands  are
  5166.                          modified  as  follows:   If an output file is
  5167.                          open and text exists in the text buffer,  the
  5168.                          Y  or _ command will produce an error message
  5169.                          and the command will be aborted  leaving  the
  5170.                          text  buffer  unchanged.   Note  that  if  no
  5171.                          output file is open the Y and _ commands  act
  5172.                          normally.  Furthermore, if the text buffer is
  5173.                          empty the Y command can be used to bring in a
  5174.                          page of text whether or not an output file is
  5175.                          open (HKY will always work).  The  _  command
  5176.                          will  succeed  in  bringing  one page of text
  5177.                          into an empty text buffer but  will  fail  to
  5178.                          bring  in  successive pages if an output file
  5179.                          is open.
  5180.  
  5181.                ED&4      When this bit is  clear,  TECO  will  try  to
  5182.                          expand  memory  as much as it can in order to
  5183.                          try to fit  entire  pages  into  memory  when
  5184.                          requested  to  do  so.   If  this bit is set,
  5185.                          arbitrary memory expansion  will  not  occur.
  5186.                          In that case, TECO will expand memory only on
  5187.                          the A command and not  on  the  Y,  P,  or  N
  5188.                          commands.   This bit is always set in TECO-10
  5189.                          and has  no  significance  in  TECO-8  or  in
  5190.                          TECO-11 on RT-11.
  5191.  
  5192.                ED&8      Reserved for future use by TECO-8.
  5193.  
  5194.                ED&16     Allow failing searches to preserve  dot.   If
  5195.                          this  bit  is  set,  then  whenever  a search
  5196.                          fails, the  original  location  of  the  text
  5197.                          buffer  pointer  will  be preserved.  If this
  5198.                          bit is clear, then  failing  searches  (other
  5199.                          than  bounded searches) leave the text buffer
  5200.                          pointer at  pointer  position  0  after  they
  5201.                          fail.
  5202.                          [not in TECO-8]
  5203.  
  5204.                ED&32     Enable  immediate  ESCape-sequence  commands.
  5205.                          If  this  bit  is set, TECO will recognize an
  5206.                          ESCape-sequence key pressed immediately after
  5207.                          the   prompting   asterisk  as  an  immediate
  5208.                          command.  See section 4.4 for  a  description
  5209.                          of immediate ESCape-sequence commands.
  5210.  
  5211.                          If this bit is clear (the default case), TECO
  5212.                          will  treat  an  ESCape coming in immediately
  5213.                          after the asterisk prompt as a  <DELIM>  That
  5214.                          is,   TECO   will   hear   a  discrete  <ESC>
  5215.                          character:  an ESCape sequence will therefore
  5216.  
  5217.      Standard TECO                                            PAGE 107
  5218.      Mode Control Flags
  5219.  
  5220.  
  5221.                          be treated not as a unified command, but as a
  5222.                          sequence of characters.
  5223.                          [TECO-11 only]
  5224.  
  5225.                ED&64     Only move dot by one on  multiple  occurrence
  5226.                          searches.   If this bit is clear, TECO treats
  5227.                          nStext` exactly as n<1Stext`>.  That is, skip
  5228.                          over  the  whole  matched  search string when
  5229.                          proceeding to  the  nth  search  match.   For
  5230.                          example,  if  the  text  buffer contains only
  5231.                          A's, the command 5SAA` will complete with dot
  5232.                          equal  to ten (10).  If this bit is set, TECO
  5233.                          increments dot by one each search match.   In
  5234.                          the above example, dot would become five (5).
  5235.                          [TECO-11 only]
  5236.  
  5237.                ED&128    Automatic refresh inhibit.  If scroll mode is
  5238.                          enabled  (that  is, if 7:W is non-zero), TECO
  5239.                          normally refreshes the  text  buffer  display
  5240.                          just  before  printing its * prompt.  Setting
  5241.                          the 128 bit in  ED  inhibits  this  automatic
  5242.                          refresh.   (Inhibiting  the automatic refresh
  5243.                          may  be  useful  when  running  over  a  slow
  5244.                          terminal  line;   see  also  the ^W immediate
  5245.                          command.)
  5246.                          [TECO-11 only]
  5247.  
  5248.                The initial value of  ED&1  is  system  dependent  (See
  5249.                appendices).   The  initial  value of the other bits in
  5250.                the ED flag is 0.
  5251.  
  5252.      EE        This flag is initially zero, and (unless  the  8192  ET
  5253.                bit  is  set)  TECO  recognizes  only the ESCape as its
  5254.                <DELIM> character from the console.  If it  is  desired
  5255.                to  use  another  character  as an ESCape surrogate (as
  5256.                when working from a terminal lacking  an  ESCape  key),
  5257.                the  ASCII  value of that other character may be set in
  5258.                the EE flag.  Note that when  an  ESCape  surrogate  is
  5259.                set,  the  designated  character  (when  typed  at  the
  5260.                console) is received by  TECO  as  an  ESCape  --  that
  5261.                character  is  no  longer  directly  available  at  the
  5262.                keyboard.  When  an  ESCape  surrogate  is  active,  an
  5263.                ESCape  received  by  TECO echos as accent grave;  when
  5264.                none is active, an ESCape received  by  TECO  echos  as
  5265.                dollar  sign.  This feature is provided for the benefit
  5266.                of newer terminals which lack an ESCape  key.   (8192ET
  5267.                and  96EE both set ` as ESCape surrogate.  EE, however,
  5268.                can be used to designate a character other than  accent
  5269.                grave.)
  5270.                [RSTS/E only]
  5271.  
  5272.      EH        The help level flag, which  controls  the  printing  of
  5273.                error  messages  and  failed commands.  (See also the /
  5274.  
  5275.      Standard TECO                                            PAGE 108
  5276.      Mode Control Flags
  5277.  
  5278.  
  5279.                command.)
  5280.  
  5281.                EH&3      The low two bits of EH (value range 0 through
  5282.                          3)   control   the  printing  of  TECO  error
  5283.                          messages as follows  (assuming  the  low  two
  5284.                          bits have value m):
  5285.  
  5286.                          If m is equal to 1, error messages are output
  5287.                          in  abbreviated form ("?XXX").  If m is equal
  5288.                          to 2, error messages  are  output  in  normal
  5289.                          form  ("?XXX  Message").  If m is equal to 3,
  5290.                          error messages are output in long or "War and
  5291.                          Peace"   form,   that   is,  a  paragraph  of
  5292.                          informative material is typed  following  the
  5293.                          normal   form   of  the  error  message.   In
  5294.                          TECO-11, m=3 is implemented only on  VAX/VMS.
  5295.                          (See  section  G.13 for a description of HELP
  5296.                          facilities available on  VAX/VMS.)  In  other
  5297.                          TECO-11's, case m=3 is equivalent to m=2.
  5298.  
  5299.                EH&4      If this bit of EH is set, the failing command
  5300.                          is  also  output  up  to  and  including  the
  5301.                          failing character in the command followed  by
  5302.                          a  question mark.  (Just like TECO's response
  5303.                          to the typing of a question mark  immediately
  5304.                          after an error.) This bit is not supported by
  5305.                          TECO-10.
  5306.  
  5307.                The initial  value  of  the  EH  flag  is  0  which  is
  5308.                equivalent to a value of 2.
  5309.  
  5310.      EO        Setting the value of the EO flag to n  allows  features
  5311.                that were peculiar to that version of TECO to work.
  5312.                [TECO-10 only]
  5313.  
  5314.      ES        The search verification flag, which controls  the  text
  5315.                typed out after searches.
  5316.  
  5317.                If n  is  equal  to  0,  nothing  is  typed  out  after
  5318.                searches.   If  n  is -1, the current line is typed out
  5319.                when a successful search  at  top  level  is  completed
  5320.                (i.e.,  a  V  command  is done automatically).  If n is
  5321.                between 1 and 31, the current line is typed out with  a
  5322.                line  feed  immediately  following  the position of the
  5323.                pointer to identify its position.  If n is  between  32
  5324.                and  126,  the current line is typed out with the ASCII
  5325.                character corresponding to the value of  n  immediately
  5326.                following  the  position of the pointer to identify its
  5327.                position.  If you want to see more  than  one  line  of
  5328.                type  out,  use the form m*256+n.  The n is the same as
  5329.                above.  The m is the number  of  lines  of  view.   For
  5330.                example, 3*256+^^!  would give two lines on either side
  5331.                of  the  found  line,  and  the  found  line  with  the
  5332.  
  5333.      Standard TECO                                            PAGE 109
  5334.      Mode Control Flags
  5335.  
  5336.  
  5337.                character  "!"  at the pointer's position.  The ES flag
  5338.                does not apply to searches executed  inside  iterations
  5339.                or macros;  lines found inside iterations or macros are
  5340.                never typed out.
  5341.                [Not in TECO-8]
  5342.  
  5343.                The initial value of ES is 0.
  5344.  
  5345.      ET        The ET flag is a bit-encoded  word  controlling  TECO's
  5346.                treatment  of the console terminal.  Any combination of
  5347.                the individual bits may be set.  The bits  provide  the
  5348.                following functions, when set:
  5349.  
  5350.                ET&1      Type out in image  mode.   Setting  this  bit
  5351.                          inhibits  all of TECO's type out conversions.
  5352.                          All characters are  output  to  the  terminal
  5353.                          exactly  as  they  appear in the buffer or ^A
  5354.                          command.   For  example,  the   changing   of
  5355.                          control characters into the "caret/character"
  5356.                          form, and the conversion  of  <ESCAPE>  to  `
  5357.                          (accent  grave)  or  to  $  (dollar sign) are
  5358.                          suppressed.  This mode is useful for  driving
  5359.                          displays.   It  should  be used with caution,
  5360.                          especially if you are talking to TECO over  a
  5361.                          dial-up line.
  5362.  
  5363.                ET&2      Process  DELETEs  and  <CTRL/U>s  in  "scope"
  5364.                          mode.   Scope mode processing uses the cursor
  5365.                          control features of  CRT  type  terminals  to
  5366.                          handle character deletion by actually erasing
  5367.                          characters from the screen.
  5368.  
  5369.                ET&4      Read lower case.  TECO normally converts  all
  5370.                          lower  case  alphabetics  to  upper  case  on
  5371.                          input.  Setting this bit  causes  lower  case
  5372.                          alphabetics  to be input as lower case.  TECO
  5373.                          commands and file specifiers may be typed  in
  5374.                          either  upper or lower case.  For the purpose
  5375.                          of searches, however, upper  and  lower  case
  5376.                          may be treated as different characters.  (See
  5377.                          ^X flag).
  5378.  
  5379.                ET&8      Read without  echo  for  ^T  commands.   This
  5380.                          allows  data  to  be  read  by the ^T command
  5381.                          without having the  characters  echo  at  the
  5382.                          terminal.   Normal command input to TECO will
  5383.                          echo.
  5384.  
  5385.                ET&16     Cancel <CTRL/O> on type  out.   Setting  this
  5386.                          bit will cancel any outstanding <CTRL/O> when
  5387.                          the next type out  occurs.   After  TECO  has
  5388.                          canceled  the <CTRL/O>, it will automatically
  5389.                          clear the bit.
  5390.  
  5391.      Standard TECO                                            PAGE 110
  5392.      Mode Control Flags
  5393.  
  5394.  
  5395.                ET&32     Read with  no  wait.   This  enables  the  ^T
  5396.                          command  to  test if a character is available
  5397.                          at the user terminal.   If  a  character  has
  5398.                          been  typed,  ^T  returns  the  value  of the
  5399.                          character as always.   If  no  character  has
  5400.                          been typed, ^T immediately returns a value of
  5401.                          -1 and execution  continues  without  waiting
  5402.                          for a character.
  5403.  
  5404.                ET&64     Detach flag (See appendices).
  5405.  
  5406.                ET&128    "Abort-on-error" bit.   Initially  set,  when
  5407.                          TECO  starts  up;   cleared  each  time  TECO
  5408.                          issues its asterisk prompt.  When this bit is
  5409.                          set:    1) all   informational  messages  are
  5410.                          supressed,   2) any   <CTRL/C>   causes   the
  5411.                          immediate  termination  of  TECO,  and 3) any
  5412.                          error causes the termination  of  TECO  after
  5413.                          the error message is printed.
  5414.  
  5415.                ET&256    If this bit is set, all lines output  to  the
  5416.                          terminal  are  truncated  to  the  terminal's
  5417.                          width  if  needed.   (RSTS/E,   RSX-11,   and
  5418.                          VAX/VMS  only.  On VAX/VMS, this bit reflects
  5419.                          and can change  the  state  of  the  terminal
  5420.                          characteristic  WRAP/NOWRAP;   TECO  restores
  5421.                          the terminal characteristic to  its  original
  5422.                          state upon exit.)
  5423.  
  5424.                ET&512    If this bit is set, the scope "WATCH" feature
  5425.                          of  TECO  is  present  and your terminal is a
  5426.                          scope type terminal.  This bit is a read-only
  5427.                          bit;   its  state  cannot  be  altered.  (See
  5428.                          Section 5.17.)
  5429.  
  5430.                ET&1024   If this bit is set, the refresh scope "WATCH"
  5431.                          feature  of  TECO  is  present  and a refresh
  5432.                          scope is available.  This bit is a  read-only
  5433.                          bit;   its  state  cannot  be  altered.  (See
  5434.                          Section 5.17.)
  5435.  
  5436.                ET&4096   This bit reflects and can change the state of
  5437.                          the  terminal  characteristic  (maintained by
  5438.                          the operating system) recording  whether  the
  5439.                          terminal  is  capable  of  handling eight-bit
  5440.                          character codes.  Upon entry  to  TECO,  this
  5441.                          bit  reflects  the characteristic as recorded
  5442.                          with the operating system at that  time.   If
  5443.                          you  change this bit, the operating system is
  5444.                          directed  to  change  its  recording  of  the
  5445.                          characteristic to match.
  5446.  
  5447.                          Because the data manipulated (edited) by TECO
  5448.  
  5449.      Standard TECO                                            PAGE 111
  5450.      Mode Control Flags
  5451.  
  5452.  
  5453.                          can  consist  of all 256 possible byte codes,
  5454.                          the way data characters are displayed  (typed
  5455.                          out) at the console varies depending upon the
  5456.                          setting of the 4096 ET bit.
  5457.  
  5458.                          If  the  bit  is  clear  (meaning  that  TECO
  5459.                          understands your terminal to be 7-bit), valid
  5460.                          DEC multi-national codes  are  typed  out  as
  5461.                          <xy>  (where  xy  is  the corresponding LK201
  5462.                          keyboard compose sequence).
  5463.  
  5464.                          If  the  bit  is  set  (meaning   that   TECO
  5465.                          understands your terminal to be 8-bit), valid
  5466.                          DEC multi-national codes  are  typed  out  as
  5467.                          themselves.
  5468.  
  5469.                          In either case, unprintable or illegal  codes
  5470.                          in the 128 to 255 range are typed out as [ab]
  5471.                          (where ab is  the  corresponding  hexadecimal
  5472.                          code).    The  scope  watch  feature  (screen
  5473.                          buffer display, controlled by the W commands)
  5474.                          always uses the <xy> and [ab] notations.
  5475.  
  5476.                ET&8192   Accent grave as ESCape surrogate.
  5477.                          [TECO-11 only]
  5478.  
  5479.                          If this bit is set,  TECO  recognizes  the  `
  5480.                          (accent   grave)   character   as  an  ESCAPE
  5481.                          surrogate.  That is, an ` character typed  at
  5482.                          the  console  will be recognized as a command
  5483.                          <DELIM> character, and passed to TECO  as  an
  5484.                          ESCape.  (This interpretation applies only to
  5485.                          <DELIM>s  typed  at  the   console;    ESCape
  5486.                          characters  must  still be used in macros and
  5487.                          indirect files.) When an ESCape surrogate  is
  5488.                          set,  an  ESCape  received  by  TECO echos as
  5489.                          accent grave;  when none is  set,  an  ESCape
  5490.                          received  by TECO echos as dollar sign.  This
  5491.                          feature  is  provided  for  the  benefit   of
  5492.                          certain  newer terminals which lack an ESCape
  5493.                          key.  (See also the Introduction, and the  EE
  5494.                          flag.)
  5495.  
  5496.                ET&32768  If this bit is set and a <CTRL/C>  is  typed,
  5497.                          the  bit  is turned off, but execution of the
  5498.                          current  command   string   is   allowed   to
  5499.                          continue.  This allows a TECO macro to detect
  5500.                          typed <CTRL/C>s.
  5501.                          In TECO-8, this bit is the 2048's bit  rather
  5502.                          than the 32768's bit.
  5503.  
  5504.                The initial setting of ET is operating system dependent
  5505.                (See appendices).  In addition, some of the ET bits are
  5506.  
  5507.      Standard TECO                                            PAGE 112
  5508.      Mode Control Flags
  5509.  
  5510.  
  5511.                automatically turned off by certain error conditions.
  5512.  
  5513.      EU        The upper/lower case flag.
  5514.  
  5515.                If n is -1, no case flagging of any type  is  performed
  5516.                on  type out, lower case characters are output as lower
  5517.                case characters.  If n is 0, lower case characters  are
  5518.                flagged by outputting a ' (quote) before the lower case
  5519.                character and the lower case  character  is  output  in
  5520.                upper case;  upper case characters are unchanged.  If n
  5521.                is +1, upper case characters are flagged by  outputting
  5522.                a  '  (quote)  before  each one and then the upper case
  5523.                character is output;  lower case characters are  output
  5524.                as their upper case equivalents.
  5525.  
  5526.                The initial value of the EU flag is -1 if TECO can tell
  5527.                from  the  operating  system  that  the user's terminal
  5528.                supports display of lower case  characters;   otherwise
  5529.                te initial value is 0.  Consult the appendices for more
  5530.                details.
  5531.  
  5532.      EV        The edit verify flag is decoded just like the ES  flag.
  5533.                Just before TECO prints its prompting *, the EV flag is
  5534.                checked.  If it is non-zero the lines to be viewed  are
  5535.                printed on the terminal.
  5536.  
  5537.                The initial value of the EV flag is 0.
  5538.                [TECO-11 only]
  5539.  
  5540.      ^X        The search mode flag.
  5541.                [Not in TECO-8]
  5542.  
  5543.                If ^X is 0, the text argument in a search command  will
  5544.                match  text  in  the text buffer independent of case in
  5545.                either the search argument or  the  text  buffer.   The
  5546.                lower   case   alphabetics   match   the   upper   case
  5547.                alphabetics, and "`", "{", "|",  "}",  "~"  match  "@",
  5548.                "[",  "\",  "]",  "^"  respectively.   In addition, DEC
  5549.                multinational characters having diacritical  marks  are
  5550.                regarded   as  matching  the  corresponding  characters
  5551.                without diacritical marks.
  5552.  
  5553.                If ^X is -1, the search will succeed only if  the  text
  5554.                argument  is  identical  to  text  in  the text buffer.
  5555.                (This means that lower case does NOT match upper  case,
  5556.                nor  does  a  character having a diacritical mark match
  5557.                one without).
  5558.  
  5559.                The initial value of the ^X flag is 0.  (For control of
  5560.                caret  or  uparrow treatment in search strings, see the
  5561.                ED&1 bit above.)
  5562.  
  5563.      Standard TECO                                            PAGE 113
  5564.      Scope Commands
  5565.  
  5566.  
  5567.      5.17 SCOPE COMMANDS
  5568.  
  5569.      The W command (scope "WATCH") is present in most  implementations
  5570.      of  TECO.   There  are two different variations of the W command.
  5571.      Neither, one, or both may be present.  ET  flag  Bits  9  and  10
  5572.      indicate which variation(s) are configured and can be used.
  5573.  
  5574.  
  5575.      5.17.1 Video Terminal Scope Commands
  5576.  
  5577.      If the VT support  is  present  and  your  terminal  is  a  video
  5578.      terminal  (such  as a VT05, VT52, or VT100), ET flag Bit 9 (value
  5579.      512) will be on.
  5580.  
  5581.  
  5582.                 TABLE 5-17A: VIDEO TERMINAL WATCH COMMANDS
  5583.  
  5584.      COMMAND        FUNCTION
  5585.  
  5586.      -1W       Refresh the terminal's screen to show the  contents  of
  5587.                the text buffer.
  5588.  
  5589.      -nW       Tell the video terminal screen refresher that  the  top
  5590.                n-1  lines of the screen have been altered.  The screen
  5591.                refresher will completely redraw the top n-1  lines  of
  5592.                the screen upon the next -1W command.
  5593.  
  5594.      nW        Place the default cursor line at line n of the  screen.
  5595.                The  initial  default  cursor  line  is  line 16.  This
  5596.                command makes the  window  support  forget  the  screen
  5597.                image  and  any special associated modes (SEEALL, MARK,
  5598.                HOLD).
  5599.  
  5600.      0W        Equivalent to "16W".
  5601.  
  5602.      W         Forget screen image and special scope modes.
  5603.  
  5604.      -1000W    Forget that output was done.   Normally,  if  the  user
  5605.                outputs  to the terminal with a command such as T, n^T,
  5606.                or  ^A,  TECO  will  believe  that  the  window   needs
  5607.                updating,  and  upon  the  next  -1W command, TECO will
  5608.                refresh the entire window display.  Issuing the  -1000W
  5609.                command  informs  TECO  that the output command did not
  5610.                destroy the window.
  5611.                [TECO-11 only]
  5612.  
  5613.      Standard TECO                                            PAGE 114
  5614.      Video Terminal Scope Commands
  5615.  
  5616.  
  5617.      The :W commands are used to interrogate and set (see m,n:W below)
  5618.      video  terminal  status information, as well as implement some of
  5619.      the  more  advanced  features  of  the  video  terminal   "WATCH"
  5620.      functions.
  5621.  
  5622.  
  5623.                 TABLE 5-17B: VIDEO TERMINAL STATUS COMMANDS
  5624.  
  5625.      COMMAND        FUNCTION
  5626.  
  5627.      0:W       Return a number representing the type of scope  in  use
  5628.                as the editing terminal.  Current values are:
  5629.  
  5630.                0         VT52
  5631.                1         VT61 [TECO-10 only]
  5632.                2         VT100 in VT52 mode
  5633.                4         VT100 in ANSI mode
  5634.                6         VT05
  5635.                8         VT102 in ANSI mode
  5636.                10        VK100 (GIGI)
  5637.  
  5638.      :W        Equivalent to 0:W
  5639.  
  5640.      1:W       Return or set the horizontal size of the user's editing
  5641.                scope.   This number represents the number of character
  5642.                positions available horizontally along the face of  the
  5643.                scope.
  5644.  
  5645.                If  this  value  is  changed  (see  m,n:W  below),  the
  5646.                operating  system  is  automatically  informed  of  the
  5647.                terminal's  new  width  setting,  and  the  appropriate
  5648.                control  sequence  is  issued  to physically change the
  5649.                terminal's screen mode (80 versus 132 column  mode)  if
  5650.                needed.
  5651.  
  5652.      2:W       Return or set the vertical size of the  user's  editing
  5653.                scope.   This  number represents the number of lines of
  5654.                text that can appear on the  screen  of  the  terminal.
  5655.                This  number  is  affected  by use of the m,7:W command
  5656.                (set scrolling region).
  5657.  
  5658.      3:W       Return or set SEEALL mode.  0  represents  off  and  -1
  5659.                represents on.  In SEEALL mode, a visible indication is
  5660.                shown in the  window  for  every  character,  including
  5661.                characters that normally don't print.
  5662.  
  5663.      4:W       Return or set "mark" status of window support.  0 means
  5664.                that  no  mark has been set.  A value of n means that a
  5665.                mark has been set at buffer ("dot") position n-1.  This
  5666.                status is used by software that uses the window support
  5667.                and by the support itself in the case  of  scopes  that
  5668.                support reverse video.
  5669.  
  5670.      Standard TECO                                            PAGE 115
  5671.      Video Terminal Scope Commands
  5672.  
  5673.  
  5674.      5:W       Return or set the hold mode indicator.  0 means off, -1
  5675.                means hold whole screen, and a positive value, n, means
  5676.                hold all but top and bottom n lines.  If hold  mode  is
  5677.                on,  then  scrolling  is  inhibited until the cursor is
  5678.                about to run off either end of the screen.  This  makes
  5679.                the  window  display  more  palatable on terminals on a
  5680.                slow line.  If hold mode is on, the window support will
  5681.                scroll  the  window  as necessary in an attempt to keep
  5682.                the cursor centered.
  5683.  
  5684.      6:W       Returns buffer pointer position of character  that  was
  5685.                in  the  upper left hand corner of the window as of the
  5686.                last -1W command.
  5687.  
  5688.      7:W       Return or set the number  of  lines  in  the  scrolling
  5689.                (command  dialogue)  portion  of  the  screen.  If n is
  5690.                zero, then split screen scrolling  is  disabled.   When
  5691.                split   screen   scrolling  is  enabled,  n  lines  (as
  5692.                specified) are reserved at the bottom of the screen  to
  5693.                scroll  the terminal interaction.  The remainder of the
  5694.                screen is used  as  a  display  window  into  the  text
  5695.                buffer,   and   is   automatically   updated   by  TECO
  5696.                immediately before each command prompt.   This  feature
  5697.                functions  only  on  terminals  capable of split screen
  5698.                scrolling, such as  members  of  the  VT100  and  VT200
  5699.                families.
  5700.  
  5701.                The value of n must be greater than 1, and scope height
  5702.                minus n must be greater than 9.
  5703.  
  5704.                Whenever the scrolling region's size is modified  (that
  5705.                is, whenever an m,7:W command is executed), TECO alters
  5706.                the scope's height (2:W) accordingly.  For example,  if
  5707.                2:W  is currently returning a value of 24, then after a
  5708.                5,7:W command 2:W will return a value of 19.  Executing
  5709.                a 0,7:W will restore 2:W to 24.
  5710.  
  5711.      m,n:W     Sets the entity represented by n:W to m and  returns  a
  5712.                value.   If  the  new  setting  has  been accepted, the
  5713.                returned value is m.  Elsewise, the returned  value  is
  5714.                either  the  old  value associated with n:W or whatever
  5715.                new setting  was  actually  set.   In  all  cases,  the
  5716.                returned   value  reflects  the  new  current  setting.
  5717.                Specific operating systems may put restrictions on  the
  5718.                valid values for m.
  5719.  
  5720.                Note that each m,n:W command returns a value,  even  if
  5721.                your only intent is to set something.  Good programming
  5722.                practice suggests following any command which returns a
  5723.                value with <DELIM> or ^[ if you don't intend that value
  5724.                to be passed to the following command.
  5725.  
  5726.      Standard TECO                                            PAGE 116
  5727.      Video Terminal Scope Commands
  5728.  
  5729.  
  5730.      5.17.2 Refresh Scope Commands
  5731.  
  5732.      If refresh scope support  is  present  and  a  refresh  scope  is
  5733.      available  (such  as  a VS60 or a VR12), bit value 1024 of the ET
  5734.      flag will be on.
  5735.  
  5736.  
  5737.                  TABLE 5-17C: REFRESH SCOPE WATCH COMMANDS
  5738.  
  5739.      COMMAND        FUNCTION
  5740.  
  5741.      W         Update the refresh scope screen to reflect the contents
  5742.                of   the  text  buffer  surrounding  the  text  pointer
  5743.                ("dot").
  5744.  
  5745.      0W        Turn off the refresh scope display.
  5746.  
  5747.      nW        Set the number of lines to be displayed around the text
  5748.                pointer to n.
  5749.  
  5750.      Standard TECO                                            PAGE 117
  5751.      Programming Aids
  5752.  
  5753.  
  5754.      5.18 PROGRAMMING AIDS
  5755.  
  5756.      In addition to the command string editing capabilities  described
  5757.      in  Chapter  4,  TECO  includes  various  features  to facilitate
  5758.      programming.  These are described in the following sections.
  5759.  
  5760.  
  5761.      5.18.1 Text Formatting
  5762.  
  5763.      The characters carriage return, line feed, and space are  ignored
  5764.      in  command  strings,  except  when they appear as part of a text
  5765.      argument.  Numeric values are not affected.  (Inserting  a  space
  5766.      between  digits  within  a  digit  string may cause unpredictable
  5767.      results).  These characters may be inserted between any two  TECO
  5768.      commands  to lend clarity to a long command string.  The carriage
  5769.      return/line feed combination is particularly  useful  for  typing
  5770.      command strings which are too long to fit on a single line.
  5771.  
  5772.      If the character form feed is encountered in a command string and
  5773.      it  is  not part of a text argument, a form feed is output to the
  5774.      terminal.  This can  be  used  to  format  terminal  output.   On
  5775.      TECO-10, execution of the form feed command will clear the screen
  5776.      if TECO is in scope command string editing mode (2&ET on).
  5777.  
  5778.  
  5779.      5.18.2 Comments
  5780.  
  5781.      One of the most powerful features of TECO is its ability to store
  5782.      very  long  command  strings so that a given sequence of commands
  5783.      may be executed whenever needed.  Long  command  strings  may  be
  5784.      thought  of  as  editing  programs  and,  like  any other type of
  5785.      program, they should be documented by means of comments.
  5786.  
  5787.      Comments may be inserted between any two commands by using a  tag
  5788.      construction of the form:
  5789.  
  5790.                             !THIS IS A COMMENT!
  5791.  
  5792.      Comments may contain any number of characters and any  characters
  5793.      except the special characters.  Thus a long TECO macro might look
  5794.      like:
  5795.  
  5796.                 TECO commands !This comment describes line 1!
  5797.                 TECO commands !This comment describes line 2!
  5798.                 more commands
  5799.                 more commands !end of comment string!
  5800.  
  5801.      Do not use <TAB> characters to format long command strings!  Only
  5802.      <space>,  <CR>,  and  <LF>  can be used to format command strings
  5803.      since <TAB> is an insertion command.
  5804.  
  5805.      Good TECO code  is  well  structured  and  adequately  commented.
  5806.      Unfortunately,  massive  comments  in  a  TECO macro tend to slow
  5807.  
  5808.      Standard TECO                                            PAGE 118
  5809.      Programming Aids
  5810.  
  5811.  
  5812.      execution, especially if they appear within text scanned by GOTOs
  5813.      or  unsatisfied  conditionals.  Unless speed is not a goal, it is
  5814.      common practice in larger TECO programs  to  strip  out  comments
  5815.      before  loading  up  TECO  macros.   Thus the TECO program can be
  5816.      adequately commented, yet still run efficiently.
  5817.  
  5818.      A large TECO program can start by placing a comment stripper in a
  5819.      Q-register,  say  Q-register  C.   Then  it  can successively put
  5820.      subroutines (macro text) into the text buffer, do an MC, and load
  5821.      the  appropriate Q-register with the resulting text buffer, until
  5822.      all the subroutines have been loaded.  Finally, Q-register C  can
  5823.      be zeroed and the program started.
  5824.  
  5825.      In order for you to strip the comments without  losing  essential
  5826.      tags,  you must make a convention for the format of your comments
  5827.      so that your comment stripper can  distinguish  them  from  tags.
  5828.      There are two common conventions.  In one, the first character in
  5829.      every comment after the initial !  is some distinctive character,
  5830.      such  as  *.  In the other, all tags start in the left margin and
  5831.      all comments are embedded within the  text.   Any  large  comment
  5832.      that wants to be on a line by itself starts with a <space> before
  5833.      the !.  Both methods allow for readable  code  and  easy  comment
  5834.      stripping.
  5835.  
  5836.  
  5837.      5.18.3 Messages
  5838.  
  5839.      The <CTRL/A> command may be used to print out a statement at  any
  5840.      point  during  the  execution  of a command string.  The <CTRL/A>
  5841.      command has the general form:
  5842.  
  5843.                               ^Atext<CTRL/A>
  5844.  
  5845.                                     or
  5846.  
  5847.                                  @^A/text/
  5848.  
  5849.      The first ^A is the actual  command,  which  may  be  entered  by
  5850.      striking  the  control  key  and  the  A key simultaneously or by
  5851.      typing a caret (uparrow) followed by an A character.  The  second
  5852.      <CTRL/A>  character  of  the  first  form  shown  is  the command
  5853.      terminator, which must be entered by typing the control  key  and
  5854.      the  A  key  simultaneously.   In  the  second  form,  the second
  5855.      occurrence of the delimiting character (shown  as  slash  in  the
  5856.      example)  terminates  the  message.  Upon execution, this command
  5857.      causes TECO to print the specified message at the terminal.
  5858.  
  5859.      The ^Amessage<CTRL/A> command  is  particularly  useful  when  it
  5860.      precedes  a  command  whose  numeric  argument  contains ^T or ^F
  5861.      characters.  The message may contain instructions  notifying  the
  5862.      user as to what sort of input is required.
  5863.  
  5864.      Standard TECO                                            PAGE 119
  5865.      Programming Aids
  5866.  
  5867.  
  5868.      5.18.4 Tracing
  5869.  
  5870.      A question mark entered betweeen any two commands  in  a  command
  5871.      string  causes  TECO  to  print  all  subsequent  commands at the
  5872.      terminal as they are executed.  Commands will be printed as  they
  5873.      are executed until another question mark character is encountered
  5874.      or the command string terminates.
  5875.  
  5876.  
  5877.      5.18.5 Convenience Characters
  5878.  
  5879.      In addition to the characters mentioned in Section 5.18.1,  there
  5880.      are  several characters which have no special meaning to TECO but
  5881.      which may be used to help format your TECO programs  and  command
  5882.      strings.   Judicious use of these commands will make your program
  5883.      easier to read and maintain.  These characters are  described  in
  5884.      the table below:
  5885.  
  5886.  
  5887.                     TABLE 5-18A: CONVENIENCE CHARACTERS
  5888.  
  5889.      CHARACTER           MEANING
  5890.  
  5891.      <NULL>              A  null  (ASCII  0)  encountered  as  a  TECO
  5892.                          command  will be ignored.  Numeric values are
  5893.                          not affected.  A null read in from  an  input
  5894.                          file  will  be discarded (except under RSX-11
  5895.                          and  VAX/VMS).   A  null  typed  in  from   a
  5896.                          terminal will be ignored.
  5897.  
  5898.      <ESCAPE>            An ESCape that is executed as a TECO  command
  5899.                          (as distinct from an immediate action command
  5900.                          or an ESCape that is part of  the  syntax  of
  5901.                          some  other TECO command) is ignored by TECO.
  5902.                          However,  any  pending  numeric  values   are
  5903.                          discarded.    This   command  is  useful  for
  5904.                          discarding the value returned from a  command
  5905.                          (such  as  n%q  or m,n:W) when you don't want
  5906.                          that  value  to  affect  execution   of   the
  5907.                          following command.
  5908.  
  5909.      ^[                  Same  as  <ESCAPE>.   Like  any  other   TECO
  5910.                          command  that  is a control character, ESCape
  5911.                          may be entered in up-arrow  mode.   Sometimes
  5912.                          easier  to type, ^[ is also useful on systems
  5913.                          whose line-printer spoolers  do  not  visibly
  5914.                          print the ESCape character.
  5915.  
  5916.                          Any pending  numeric  values  are  discarded.
  5917.                          This  command  is  useful  for discarding the
  5918.                          value returned from a command (such as n%q or
  5919.                          m,n:W)  when  you  don't  want  that value to
  5920.                          affect execution of the following command.
  5921.  
  5922.      Standard TECO                                            PAGE 120
  5923.      Programming Aids
  5924.  
  5925.  
  5926.      <ALTMODE>           Some older terminals may have no ESCape  key,
  5927.                          but  instead a key labelled ALTMODE or PREFIX
  5928.                          which sends  TECO  a  character  whose  ASCII
  5929.                          value  is  175  or 176.  In such a case, TECO
  5930.                          will treat these characters as if  they  were
  5931.                          typed  in  as  an ESCape (octal 33), provided
  5932.                          lower to upper case conversion is enabled.
  5933.  
  5934.      $ (dollar sign)     Same as <ESCAPE>, but as a command only,  not
  5935.                          as a string terminator.
  5936.                          [TECO-10 only]
  5937.  
  5938.      Note that <TAB> and <FORM FEED> are valid TECO commands and  must
  5939.      not be used as aids to formatting TECO programs.
  5940.  
  5941.  
  5942.      5.18.6 Memory Expansion
  5943.  
  5944.      The nEC command can be used to make TECO reclaim lost space after
  5945.      it  had  expanded  memory  usage.   nEC  tells  TECO to expand or
  5946.      contract until it uses nK  words  of  memory.   If  this  is  not
  5947.      possible,  then  TECO's  memory  usage  does not change.  The 0EC
  5948.      command tells TECO to shrink back to its original size  (use  the
  5949.      least amount of memory possible).
  5950.      [TECO-10 only]
  5951.  
  5952.      Standard TECO                                            PAGE 121
  5953.      Programming Aids
  5954.  
  5955.  
  5956.      5.18.7 Case Control
  5957.  
  5958.      The <CTRL/V> and <CTRL/W>  TECO  commands  are  used  to  specify
  5959.      automatic  case  control  for  alphabetic  characters  typed into
  5960.      strings.
  5961.  
  5962.  
  5963.                    TABLE 5-18B: CASE CONTROL CHARACTERS
  5964.  
  5965.      CHARACTER      MEANING
  5966.  
  5967.      ^V        <CTRL/V> puts TECO into lower case conversion mode.  In
  5968.                this   mode,   all   alphabetic  characters  in  string
  5969.                arguments are  automatically  changed  to  lower  case.
  5970.                This  mode  can  be overridden by explicit case control
  5971.                within the  search  string.   This  command  makes  all
  5972.                strings behave as if they began with a ^V^V.
  5973.                [TECO-10 only]
  5974.  
  5975.      ^W        <CTRL/W> puts TECO into upper case conversion mode.  In
  5976.                this   mode,   all   alphabetic  characters  in  string
  5977.                arguments are  automatically  changed  to  upper  case.
  5978.                This  mode  can  be  overriden by explicit case control
  5979.                within the  search  string.   This  command  makes  all
  5980.                strings behave as if they began with ^W^W.
  5981.                [TECO-10 only]
  5982.  
  5983.      0^V       Returns TECO to its original  mode.   No  special  case
  5984.                conversion  occurs  within  strings  except  those case
  5985.                conversions that are explicitly specified by ^V and  ^W
  5986.                string build constructs located within the string.
  5987.                [TECO-10 only]
  5988.  
  5989.      0^W       Same as ^V.
  5990.                [TECO-10 only]
  5991.  
  5992.      Standard TECO                                            PAGE 122
  5993.      Manipulating Large Pages
  5994.  
  5995.  
  5996.      5.19 MANIPULATING LARGE PAGES
  5997.  
  5998.      TECO is designed to operate most efficiently when  editing  files
  5999.      that  contain  no more than several thousand characters per page.
  6000.      (TECO storage includes Q-register storage and buffer space.   The
  6001.      size  of  the  text  storage  area  is dynamic and depends on the
  6002.      amount of available memory.) If any page of an input file is  too
  6003.      large  to  fit  in  the  text  area, the TECO input commands will
  6004.      terminate reading that page into memory when the first line  feed
  6005.      is  encountered  after a point that the buffer is 3/4 full.  (See
  6006.      appendices for details.) You can make  room  by  positioning  the
  6007.      pointer past a section of text at the beginning of the buffer and
  6008.      moving that section out of the buffer with the commands:
  6009.  
  6010.                0,.PW0,.K
  6011.  
  6012.      It is sometimes advantageous to restrict the amount of  the  file
  6013.      that  is  present  in  the  buffer.  For example, each insert and
  6014.      delete command must move the entire text that is beyond the point
  6015.      of  insertion  or  deletion.   An  operation that does many small
  6016.      inserts or deletes may therefore run extremely slowly if the text
  6017.      buffer  is large.  Such an operation can be sped up substantially
  6018.      by reading the  input  file  with  n:A  commands  and  explicitly
  6019.      writing the processed text.
  6020.  
  6021.      Standard TECO                                            PAGE 123
  6022.      Techniques
  6023.  
  6024.  
  6025.      5.20 TECHNIQUES AND EXAMPLES
  6026.  
  6027.      The most elementary TECO application, described in Chapter  1  of
  6028.      this  manual,  is  creating and editing ASCII files on-line.  The
  6029.      user enters short command strings, often consisting of  a  single
  6030.      command,  and  proceeds  from  task  to  task  until  the file is
  6031.      completely edited.
  6032.  
  6033.      Since every editing  job  is  simply  a  long  sequence  of  TECO
  6034.      commands,  you may accomplish an entire job with one long command
  6035.      string made up of all the short command strings placed end to end
  6036.      with  the  intervening double <DELIM> characters removed.  A long
  6037.      command string that  performs  a  certain  editing  task  can  be
  6038.      considered  a  TECO  "editing  program".  Editing programs may be
  6039.      written (using TECO) and stored in the same manner as  any  other
  6040.      ASCII  file.  Whenever the program is needed, it may be read into
  6041.      the buffer as text, stored in a Q-register, and executed by an Mq
  6042.      command.
  6043.  
  6044.      For more complex editing jobs, you may want to write and maintain
  6045.      a   collection   of   specialized   "editing  subroutines."  TECO
  6046.      subroutines can perform such elementary  functions  as  replacing
  6047.      every  occurrence  of  two  or  more  consecutive  spaces  with a
  6048.      tabulation character, for example, or ensuring that words are not
  6049.      hyphenated  across  a  page  boundary.   When  an editing problem
  6050.      arises, you can load the right combination  of  subroutines  into
  6051.      various  Q-registers,  augment  them  with additional commands if
  6052.      necessary, and call them by a "mainline" command string.
  6053.  
  6054.      Editing subroutines are essentially macros;  that  is,  sequences
  6055.      of  commands  which  perform commonly required editing functions.
  6056.      The most powerful application of TECO is the creation and use  of
  6057.      a  macro  library.   As  you  perform  an  editing  job, look for
  6058.      sequences of operations which might be required in future editing
  6059.      assignments.   Load  all of the TECO commands required to perform
  6060.      such an operation into a Q-register.  When the job  is  finished,
  6061.      write the contents of the Q-register onto an output file (via the
  6062.      buffer) and save it in the macro  library.   The  nMq  and  m,nMq
  6063.      commands, which were designed to facilitate use of macros, permit
  6064.      run-time numeric arguments to be passed to a macro.
  6065.  
  6066.      TECO macros can preserve the user's radix, flag values, etc.   By
  6067.      using  the Q-register push-down list, the macro can save and then
  6068.      restore values and/or text.  For example:
  6069.  
  6070.        [0 [1 [2     ! Save contents of Q-registers 0, 1 and 2 !
  6071.        +0U0         ! Put any calling argument into Q-register 0 !
  6072.        10U1         ! Put a 10 (if radix is decimal) or 8 (if radix is
  6073.                       octal) into Q-register 1 !
  6074.        ^D           ! Ensure that the current radix is now decimal !
  6075.        EUU2         ! Save the case flagging flag !
  6076.        -1EU         ! Ensure no case flagging !
  6077.        Q0"E 3U0 '   ! Default calling argument to 3 !
  6078.  
  6079.      Standard TECO                                            PAGE 124
  6080.      Techniques
  6081.  
  6082.  
  6083.        ...
  6084.        Q2EU         ! Restore the case flagging flag !
  6085.        10-Q1"N ^O ' ! Restore radix as octal if needed !
  6086.        ]2 ]1 ]0     ! Restore contents of Q-registers 2, 1, and 0 !
  6087.  
  6088.      The EI command is particularly useful for executing macros from a
  6089.      library,  since  with  it they may be read without disturbing the
  6090.      current input file.  This makes it unnecessary to plan in advance
  6091.      which  macros  might be needed;  it also saves Q-register storage
  6092.      space.  You can retrieve two kinds of TECO command files with  an
  6093.      EI  command:   a  file  containing  a TECO command that loads the
  6094.      macro into a Q-register for later use, or a file containing  just
  6095.      the macro (which must be retrieved with EI each time it is used).
  6096.  
  6097.      The following examples are intended to  illustrate  some  of  the
  6098.      techniques discussed above.  It would not be practical to include
  6099.      examples of the use of every TECO  command,  since  most  of  the
  6100.      commands  apply  to  many  diverse  situations.  Instead, you are
  6101.      encouraged to experiment with the individual commands on  scratch
  6102.      files.
  6103.  
  6104.  
  6105.      EXAMPLE 1:  SPLITTING, MERGING, AND REARRANGING FILES
  6106.  
  6107.      Assume that there is a file named PROG.DAT on the system disk and
  6108.      that this file contains data in the following form:
  6109.  
  6110.      AB <FF> CD <FF> EF <FF> GH <FF> IJ <FF> KL <FF> MN <FF> OP
  6111.  
  6112.      where each of the letters A, B, C etc., represents  20  lines  of
  6113.      text and <FF> represents a form feed character.  The user intends
  6114.      to rearrange the file so that it appears in the following format:
  6115.  
  6116.      AOB <FF> D <FF> MN <FF> EF <FF> ICJ <FF> KL <FF> P <FF> GH
  6117.  
  6118.      The  following   sequence   of   commands   will   achieve   this
  6119.      rearrangement.    (Search   command   arguments  are  not  listed
  6120.      explicitly.)
  6121.  
  6122.  
  6123.                          Start TECO.
  6124.      *2ED``              Allow all Y commands.
  6125.      *EBPROG.DAT`Y``     Specify input file and get first page.
  6126.      *NC``               Search for a character string in C, writing A
  6127.                          and B on the output file.
  6128.      *J20X1``            Save all of C in Q-register 1.
  6129.      *20K``              Delete C from the buffer.
  6130.      *NG``               Search for a character string in  G,  writing
  6131.                          D, E, and F on the output file.
  6132.      *HX2``              Save G and H in Q-register 2.
  6133.      *Y``                Delete GH from the buffer and read IJ.
  6134.      *20L``              Move the pointer to the beginning of J.
  6135.      *G1``               Insert C, which was stored in Q-register 1.
  6136.  
  6137.      Standard TECO                                            PAGE 125
  6138.      Techniques
  6139.  
  6140.  
  6141.      *NM``               Search for a character string in  M,  writing
  6142.                          ICJ and KL on the output file.
  6143.      *HX1``              Save  MN  in  Q-register  1   (the   previous
  6144.                          contents is overwritten).
  6145.      *Y``                Delete MN and read OP
  6146.      *J20X3``            Save all of O in Q-register 3.
  6147.      *20K``              Delete O from the buffer.
  6148.      *PWHK``             Write P onto the  output  file,  appending  a
  6149.                          form feed, and clear the text buffer.
  6150.      *G2``               Bring GH into the buffer from Q-register 2.
  6151.      *HPEF``             Write GH on the output file and close it.
  6152.      *EBPROG.DAT`Y``     Open the partially revised file.
  6153.      *20L``              Move the pointer to the beginning of B.
  6154.      *G3``               Insert all of O from Q-register 3.
  6155.      *ND``               Search for a character string  in  D  writing
  6156.                          AOB on the output file.
  6157.      *PWHK``             Write D on the output file and clear buffer.
  6158.      *G1``               Bring all of MN from Q-register  1  into  the
  6159.                          buffer.
  6160.      *EX``               Write MN onto the output file, then close the
  6161.                          file and exit.
  6162.  
  6163.      At this point the file has been rearranged in the desired format.
  6164.      Of  course,  this  rearrangement  could have been accomplished in
  6165.      fewer steps if the commands listed above had been  combined  into
  6166.      longer  command  strings.   Note  that the asterisks shown at the
  6167.      left margin in this example are generated by TECO, and not  typed
  6168.      by the user.
  6169.  
  6170.      Assume, now, that the same input file,  containing  data  in  the
  6171.      form:
  6172.  
  6173.      AB <FF> CD <FF> EF <FF> ... <FF> OP
  6174.  
  6175.      is to be split into two  separate  files,  with  the  first  file
  6176.      containing  AB <FF> CD  and the second file containing KL <FF> M,
  6177.      while the rest of the data is to  be  discarded.   The  following
  6178.      commands could be used to achieve this rearrangement:
  6179.  
  6180.  
  6181.                          Start TECO.
  6182.      *2ED``              Allow all Y commands.
  6183.      *ERFILE`EWFILE1``   Open the input  file  and  the  first  output
  6184.                          file.
  6185.      *Y``                Read AB into the buffer.
  6186.      *P``                Write AB <FF> onto the output file  and  read
  6187.                          CD into the buffer.
  6188.      *HPEF``             Write  CD  onto  the  output  file   (without
  6189.                          appending  a  form feed), and close the first
  6190.                          output file.
  6191.      *_K``               Search for a character string  in  K.   After
  6192.                          this  command  has  been executed, the buffer
  6193.                          will contain KL.  No output is generated.
  6194.  
  6195.      Standard TECO                                            PAGE 126
  6196.      Techniques
  6197.  
  6198.  
  6199.      *EWFILE2`P``        Open the second output file and write KL onto
  6200.                          it.  Read MN into the buffer.
  6201.      *20L0,.P``          Move the pointer to the end of M, then  write
  6202.                          M onto the output file.
  6203.      *EF``               Close the output file.
  6204.      *HKEX``             Clear the buffer and exit.
  6205.  
  6206.      As a final example of file manipulation techniques,  assume  that
  6207.      there  are  two  files.   One  file  is  MATH.ONE, which contains
  6208.      information in the form:
  6209.  
  6210.      AB <FF> CD <FF> EF <FF> GH <FF> IJ <FF> KL
  6211.  
  6212.      and the other is MATH.TWO, which contains:
  6213.  
  6214.      MN <FF> OP <FF> QR
  6215.  
  6216.      If both of these files are stored on DK1, the following  sequence
  6217.      of  commands  may  be  used  to merge the two files into a single
  6218.      file, MATH.NEW, which contains all of MATH.TWO  followed  by  the
  6219.      latter half of file MATH.ONE in the following format:
  6220.  
  6221.      MN <FF> OP <FF> QR <FF> GH <FF> IJ <FF> KL
  6222.  
  6223.  
  6224.                          Start TECO.
  6225.      *2ED``              Allow all Y commands.
  6226.      *ERDK1:MATH.TWO``   Open the first input file.
  6227.      *EWMATH.NEW``       Open the output file on the default device.
  6228.      *Y``                Read MN into the text buffer.
  6229.      *NR``               Search for a character string in  R,  writing
  6230.                          MN and OP onto the output file.
  6231.      *PW``               Write QR onto the output  file,  appending  a
  6232.                          form feed.
  6233.      *ERDK1:MATH.ONE``   Open the second input file.
  6234.      *HKY``              Read AB into the buffer.  QR is over-written.
  6235.      *_G``               Search for a character string in G,  deleting
  6236.                          AB, CD, and EF, leaving GH in the buffer.
  6237.      *NK``               Search for a character string in  K,  writing
  6238.                          GH  and  IJ on the output file, leaving KL in
  6239.                          the buffer.
  6240.      *HPEFHKEX``         Write  KL  onto  the  output  file   (without
  6241.                          appending  a  form  feed) and close the file,
  6242.                          then exit.
  6243.  
  6244.      Standard TECO                                            PAGE 127
  6245.      Techniques
  6246.  
  6247.  
  6248.      EXAMPLE 2:  ALPHABETIZING BY INTERCHANGE SORT
  6249.  
  6250.      Assume that TECO is running and that  the  buffer  contains  many
  6251.      short lines of text beginning with an alphabetic character at the
  6252.      left margin (i.e., immediately following a line feed).  The lines
  6253.      might consist of names in a roster, for example, or entries in an
  6254.      index.  The following command string  will  rearrange  the  lines
  6255.      into  rough  alphabetical  order,  grouping all lines which begin
  6256.      with the character "A" at the beginning of the page, followed  by
  6257.      all  lines with "B", and so on.  Note that the algorithm could be
  6258.      extended to place the entries in  strict  alphabetical  order  by
  6259.      having  it  loop  back  to  perform the same sorting operation on
  6260.      successive characters in each line.
  6261.  
  6262.  
  6263.      !START! J 0AUA                !Load first character of first line
  6264.                                    into Q-register A !
  6265.      !CONT!  L 0AUB                !Load first character of next  line
  6266.                                    into Q-register B !
  6267.      QA-QB"G XA K -L GA 1UZ '      !If A>B, switch the lines and set a
  6268.                                    flag (Q-register Z) !
  6269.      QBUA                          !Load B into A !
  6270.      L Z-."G -L @O/CONT/ '         !Loop back if there is another line
  6271.                                    in the buffer !
  6272.      QZ"G 0UZ @O/START/ '          !Repeat if a switch was made on the
  6273.                                    last pass !
  6274.  
  6275.  
  6276.      The same algorithm can be coded  in  a  more  structured  way  as
  6277.      follows:
  6278.  
  6279.  
  6280.      0UZ                           !clear repeat flag!
  6281.      <J 0AUA L                     !Load first character of first line
  6282.                                    into Q-register A !
  6283.      <0AUB                         !Load first character of next  line
  6284.                                    into Q-register B !
  6285.      QA-QB"G XA K -L GA -1UZ '     !If A>B, switch the lines and set a
  6286.                                    flag !
  6287.      QBUA                          !Load B into A !
  6288.      L .-Z;>                       !Loop back if there is another line
  6289.                                    in the buffer !
  6290.      QZ;>                          !Repeat if a switch was made on the
  6291.                                    last pass !
  6292.  
  6293.      This example is a bit shorter and does not  use  any  GOTOs.   It
  6294.      will also run somewhat faster.
  6295.  
  6296.      Standard TECO                                            PAGE 128
  6297.      Appendix A
  6298.  
  6299.  
  6300.                                 APPENDIX A
  6301.  
  6302.  
  6303.                     Octal & Decimal ASCII Character Set
  6304.  
  6305.      (GL characters, on one page)
  6306.  
  6307.  
  6308.  
  6309.  
  6310.      Char  Oct Dec   Char Oct Dec   Char Oct Dec   Char Oct Dec
  6311.  
  6312.  
  6313.       NUL  000 000    SP  040 032     @  100 064     `  140 096
  6314.       ^A   001 001    !   041 033     A  101 065     a  141 097
  6315.       ^B   002 002    "   042 034     B  102 066     b  142 098
  6316.       ^C   003 003    #   043 035     C  103 067     c  144 099
  6317.       ^D   004 004    $   044 036     D  104 068     d  144 100
  6318.       ^E   005 005    %   045 037     E  105 069     e  145 101
  6319.       ^F   006 006    &   046 038     F  106 070     f  146 102
  6320.       ^G   007 007    '   047 039     G  107 071     g  147 103
  6321.  
  6322.       BS   010 008    (   050 040     H  110 072     h  150 104
  6323.       TAB  011 009    )   051 041     I  111 073     i  151 105
  6324.       LF   012 010    *   052 042     J  112 074     j  152 106
  6325.       VT   013 011    +   053 043     K  113 075     k  153 107
  6326.       FF   014 012    ,   054 044     L  114 076     l  154 108
  6327.       CR   015 013    -   055 045     M  115 077     m  155 109
  6328.       ^N   016 014    .   056 046     N  116 078     n  156 110
  6329.       ^O   017 015    /   057 047     O  117 079     o  157 111
  6330.  
  6331.       ^P   020 016    0   060 048     P  120 080     p  160 112
  6332.       ^Q   021 017    1   061 049     Q  121 081     q  161 113
  6333.       ^R   022 018    2   062 050     R  122 082     r  162 114
  6334.       ^S   023 019    3   063 051     S  123 083     s  163 115
  6335.       ^T   024 020    4   064 052     T  124 084     t  164 116
  6336.       ^U   025 021    5   065 053     U  125 085     u  165 117
  6337.       ^V   026 022    6   066 054     V  126 086     v  166 118
  6338.       ^W   027 023    7   067 055     W  127 087     w  167 119
  6339.  
  6340.       ^X   030 024    8   070 056     X  130 088     x  170 120
  6341.       ^Y   031 025    9   071 057     Y  131 089     y  171 121
  6342.       ^Z   032 026    :   072 058     Z  132 090     z  172 122
  6343.       ESC  033 027    ;   073 059     [  133 091     {  173 123
  6344.       FS   034 028    <   074 060     \  134 092     |  174 124
  6345.       GS   035 029    =   075 061     ]  135 093     }  175 125
  6346.       RS   036 030    >   076 062     ^  136 094     ~  176 126
  6347.       US   037 031    ?   077 063     _  137 095     DEL    177 127
  6348.  
  6349.  
  6350.  
  6351.  
  6352.      Continued...
  6353.  
  6354.      Standard TECO                                            PAGE 129
  6355.      Appendix A
  6356.  
  6357.  
  6358.                            APPENDIX A, Continued
  6359.  
  6360.  
  6361.        Octal, Hexadecimal, & Decimal ASCII Character Set (Complete)
  6362.  
  6363.  
  6364.  
  6365.  
  6366.               Hex   Oct   Dec   Char    Description
  6367.  
  6368.               [00]  000     0.  <NUL>
  6369.               [01]  001     1.  ^A      Control-A
  6370.               [02]  002     2.  ^B      Control-B
  6371.               [03]  003     3.  ^C      Control-C
  6372.               [04]  004     4.  ^D      Control-D
  6373.               [05]  005     5.  ^E      Control-E
  6374.               [06]  006     6.  ^F      Control-F
  6375.               [07]  007     7.  ^G      Bell
  6376.  
  6377.               [08]  010     8.  <BS>    Backspace
  6378.               [09]  011     9.  <TAB>   Horizontal tab
  6379.               [0A]  012    10.  <LF>    Line feed
  6380.               [0B]  013    11.  <VT>    Vertical tab
  6381.               [0C]  014    12.  <FF>    Form feed
  6382.               [0D]  015    13.  <CR>    Carriage return
  6383.               [0E]  016    14.  <SO>    Control-N
  6384.               [0F]  017    15.  <SI>    Control-O
  6385.  
  6386.               [10]  020    16.  ^P      Control-P
  6387.               [11]  021    17.  <XON>   Control-Q
  6388.               [12]  022    18.  ^R      Control-R
  6389.               [13]  023    19.  <XOFF>  Control-S
  6390.               [14]  024    20.  ^T      Control-T
  6391.               [15]  025    21.  ^U      Control-U
  6392.               [16]  026    22.  ^V      Control-V
  6393.               [17]  027    23.  ^W      Control-W
  6394.  
  6395.               [18]  030    24.  ^X      Control-X
  6396.               [19]  031    25.  ^Y      Control-Y
  6397.               [1A]  032    26.  ^Z      Control-Z
  6398.               [1B]  033    27.  <ESC>   ESCape, control-[
  6399.               [1C]  034    28.  <FS>    Control-\
  6400.               [1D]  035    29.  <GS>    Control-]
  6401.               [1E]  036    30.  <RS>    Control-^
  6402.               [1F]  037    31.  <US>    Control-_
  6403.  
  6404.  
  6405.  
  6406.  
  6407.      Continued...
  6408.  
  6409.      Standard TECO                                            PAGE 130
  6410.      Appendix A
  6411.  
  6412.  
  6413.                            APPENDIX A, Continued
  6414.  
  6415.  
  6416.        Octal, Hexadecimal, & Decimal ASCII Character Set (Complete)
  6417.  
  6418.  
  6419.  
  6420.  
  6421.               Hex   Oct   Dec   Char    Description
  6422.  
  6423.               [20]  040    32.          Space
  6424.               [21]  041    33.  !       Explanation point
  6425.               [22]  042    34.  "       Double quotation mark
  6426.               [23]  043    35.  #       Number sign
  6427.               [24]  044    36.  $       Dollar sign
  6428.               [25]  045    37.  %       Percent sign
  6429.               [26]  046    38.  &       Ampersand
  6430.               [27]  047    39.  '       Single quote,  apostrophe
  6431.  
  6432.               [28]  050    40.  (       Left parenthesis
  6433.               [29]  051    41.  )       Right parenthesis
  6434.               [2A]  052    42.  *       Asterisk
  6435.               [2B]  053    43.  +       Plus
  6436.               [2C]  054    44.  ,       Comma
  6437.               [2D]  055    45.  -       Hyphen, minus
  6438.               [2E]  056    46.  .       Period, decimal point
  6439.               [2F]  057    47.  /       Slash, slant, solidus
  6440.  
  6441.               [30]  060    48.  0       Digit 0
  6442.               [31]  061    49.  1       Digit 1
  6443.               [32]  062    50.  2       Digit 2
  6444.               [33]  063    51.  3       Digit 3
  6445.               [34]  064    52.  4       Digit 4
  6446.               [35]  065    53.  5       Digit 5
  6447.               [36]  066    54.  6       Digit 6
  6448.               [37]  067    55.  7       Digit 7
  6449.  
  6450.               [38]  070    56.  8       Digit 8
  6451.               [39]  071    57.  9       Digit 9
  6452.               [3A]  072    58.  :       Colon
  6453.               [3B]  073    59.  ;       Semicolon
  6454.               [3C]  074    60.  _<      Left angle, less than
  6455.               [3D]  075    61.  =       Equals
  6456.               [3E]  076    62.  _>      Right angle, greater than
  6457.               [3F]  077    63.  ?       Question mark
  6458.  
  6459.  
  6460.  
  6461.  
  6462.      Continued...
  6463.  
  6464.      Standard TECO                                            PAGE 131
  6465.      Appendix A
  6466.  
  6467.  
  6468.                            APPENDIX A, Continued
  6469.  
  6470.  
  6471.        Octal, Hexadecimal, & Decimal ASCII Character Set (Complete)
  6472.  
  6473.  
  6474.  
  6475.  
  6476.               Hex   Oct   Dec   Char    Description
  6477.  
  6478.               [40]  100    64.  @       Commercial at
  6479.               [41]  101    65.  A       Upper case A
  6480.               [42]  102    66.  B       Upper case B
  6481.               [43]  103    67.  C       Upper case C
  6482.               [44]  104    68.  D       Upper case D
  6483.               [45]  105    69.  E       Upper case E
  6484.               [46]  106    70.  F       Upper case F
  6485.               [47]  107    71.  G       Upper case G
  6486.  
  6487.               [48]  110    72.  H       Upper case H
  6488.               [49]  111    73.  I       Upper case I
  6489.               [4A]  112    74.  J       Upper case J
  6490.               [4B]  113    75.  K       Upper case K
  6491.               [4C]  114    76.  L       Upper case L
  6492.               [4D]  115    77.  M       Upper case M
  6493.               [4E]  116    78.  N       Upper case N
  6494.               [4F]  117    79.  O       Upper case O
  6495.  
  6496.               [50]  120    80.  P       Upper case P
  6497.               [51]  121    81.  Q       Upper case Q
  6498.               [52]  122    82.  R       Upper case R
  6499.               [53]  123    83.  S       Upper case S
  6500.               [54]  124    84.  T       Upper case T
  6501.               [55]  125    85.  U       Upper case U
  6502.               [56]  126    86.  V       Upper case V
  6503.               [57]  127    87.  W       Upper case W
  6504.  
  6505.               [58]  130    88.  X       Upper case X
  6506.               [59]  131    89.  Y       Upper case Y
  6507.               [5A]  132    90.  Z       Upper case Z
  6508.               [5B]  133    91.  [       Opening bracket
  6509.               [5C]  134    92.  \       Backslash, reverse slant
  6510.               [5D]  135    93.  ]       Closing bracket
  6511.               [5E]  136    94.  ^       Circumflex, caret, uparrow
  6512.               [5F]  137    95.  _       Underline, underscore
  6513.  
  6514.  
  6515.  
  6516.  
  6517.      Continued...
  6518.  
  6519.      Standard TECO                                            PAGE 132
  6520.      Appendix A
  6521.  
  6522.  
  6523.                            APPENDIX A, Continued
  6524.  
  6525.  
  6526.        Octal, Hexadecimal, & Decimal ASCII Character Set (Complete)
  6527.  
  6528.  
  6529.  
  6530.  
  6531.               Hex   Oct   Dec   Char    Description
  6532.  
  6533.               [60]  140    96.  `       Accent grave
  6534.               [61]  141    97.  a       Lower case a
  6535.               [62]  142    98.  b       Lower case b
  6536.               [63]  143    99.  c       Lower case c
  6537.               [64]  144   100.  d       Lower case d
  6538.               [65]  145   101.  e       Lower case e
  6539.               [66]  146   102.  f       Lower case f
  6540.               [67]  147   103.  g       Lower case g
  6541.  
  6542.               [68]  150   104.  h       Lower case h
  6543.               [69]  151   105.  i       Lower case i
  6544.               [6A]  152   106.  j       Lower case j
  6545.               [6B]  153   107.  k       Lower case k
  6546.               [6C]  154   108.  l       Lower case l
  6547.               [6D]  155   109.  m       Lower case m
  6548.               [6E]  156   110.  n       Lower case n
  6549.               [6F]  157   111.  o       Lower case o
  6550.  
  6551.               [70]  160   112.  p       Lower case p
  6552.               [71]  161   113.  q       Lower case q
  6553.               [72]  162   114.  r       Lower case r
  6554.               [73]  163   115.  s       Lower case s
  6555.               [74]  164   116.  t       Lower case t
  6556.               [75]  165   117.  u       Lower case u
  6557.               [76]  166   118.  v       Lower case v
  6558.               [77]  167   119.  w       Lower case w
  6559.  
  6560.               [78]  170   120.  x       Lower case x
  6561.               [79]  171   121.  y       Lower case y
  6562.               [7A]  172   122.  z       Lower case z
  6563.               [7B]  173   123.  {       Opening brace
  6564.               [7C]  174   124.  |       Vertical line
  6565.               [7D]  175   125.  }       Closing brace
  6566.               [7E]  176   126.  ~       Tilde, overline, high line
  6567.               [7F]  177   127.  <DEL>   Delete, rubout
  6568.  
  6569.  
  6570.  
  6571.  
  6572.      Continued...
  6573.  
  6574.      Standard TECO                                            PAGE 133
  6575.      Appendix A
  6576.  
  6577.  
  6578.                            APPENDIX A, Continued
  6579.  
  6580.  
  6581.        Octal, Hexadecimal, & Decimal ASCII Character Set (Complete)
  6582.  
  6583.  
  6584.  
  6585.  
  6586.               Hex   Oct   Dec   Char    Description
  6587.  
  6588.               [80]  200   128.
  6589.               [81]  201   129.
  6590.               [82]  202   130.
  6591.               [83]  203   131.
  6592.               [84]  204   132.  <IND>
  6593.               [85]  205   133.  <NEL>
  6594.               [86]  206   134.  <SSA>
  6595.               [87]  207   135.  <ESA>
  6596.  
  6597.               [88]  210   136.  <HTS>
  6598.               [89]  211   137.  <HTJ>
  6599.               [8A]  212   138.  <VTS>
  6600.               [8B]  213   139.  <PLD>
  6601.               [8C]  214   140.  <PLU>
  6602.               [8D]  215   141.  <RI>
  6603.               [8E]  216   142.  <SS2>
  6604.               [8F]  217   143.  <SS3>
  6605.  
  6606.               [90]  220   144.  <DCS>
  6607.               [91]  221   145.  <PU1>
  6608.               [92]  222   146.  <PU2>
  6609.               [93]  223   147.  <STS>
  6610.               [94]  224   148.  <CCH>
  6611.               [95]  225   149.  <MW>
  6612.               [96]  226   150.  <SPA>
  6613.               [97]  227   151.  <EPA>
  6614.  
  6615.               [98]  230   152.
  6616.               [99]  231   153.
  6617.               [9A]  232   154.
  6618.               [9B]  233   155.  <CSI>
  6619.               [9C]  234   156.  <ST>
  6620.               [9D]  235   157.  <OSC>
  6621.               [9E]  236   158.  <PM>
  6622.               [9F]  237   159.  <APC>
  6623.  
  6624.  
  6625.  
  6626.  
  6627.      Continued...
  6628.  
  6629.      Standard TECO                                            PAGE 134
  6630.      Appendix A
  6631.  
  6632.  
  6633.                            APPENDIX A, Continued
  6634.  
  6635.  
  6636.        Octal, Hexadecimal, & Decimal ASCII Character Set (Complete)
  6637.  
  6638.  
  6639.  
  6640.  
  6641.               Hex   Oct   Dec   --      Description
  6642.  
  6643.               [A0]  240   160.          -
  6644.               [A1]  241   161.          Inverted exclamation mark
  6645.               [A2]  242   162.          Cent sign
  6646.               [A3]  243   163.          Pound sterling sign
  6647.               [A4]  244   164.          reserved for future
  6648.               [A5]  245   165.          Yen
  6649.               [A6]  246   166.          reserved for future
  6650.               [A7]  247   167.          Section sign
  6651.  
  6652.               [A8]  250   168.          General currency sign
  6653.               [A9]  251   169.          Copyright sign
  6654.               [AA]  252   170.          Feminine ordinal indicator
  6655.               [AB]  253   171.          Angle quotation mark left
  6656.               [AC]  254   172.          reserved for future
  6657.               [AD]  255   173.          reserved for future
  6658.               [AE]  256   174.          reserved for future
  6659.               [AF]  257   175.          reserved for future
  6660.  
  6661.               [B0]  260   176.          Degree sign
  6662.               [B1]  261   177.          Plus/minus sign
  6663.               [B2]  262   178.          Superscript 2
  6664.               [B3]  263   179.          Superscript 3
  6665.               [B4]  264   180.          reserved for future
  6666.               [B5]  265   181.          Micro sign, Greek mu
  6667.               [B6]  266   182.          Paragraph sign, pilcrow
  6668.               [B7]  267   183.          Middle dot
  6669.  
  6670.               [B8]  270   184.          reserved for future
  6671.               [B9]  271   185.          Superscript 1
  6672.               [BA]  272   186.          Masculine ordinal indicator
  6673.               [BB]  273   187.          Angle quotation mark right
  6674.               [BC]  274   188.          Fraction one quarter
  6675.               [BD]  275   189.          Fraction one half
  6676.               [BE]  276   190.          reserved for future
  6677.               [BF]  277   191.          Inverted question mark
  6678.  
  6679.  
  6680.  
  6681.  
  6682.      Continued...
  6683.  
  6684.      Standard TECO                                            PAGE 135
  6685.      Appendix A
  6686.  
  6687.  
  6688.                            APPENDIX A, Continued
  6689.  
  6690.  
  6691.        Octal, Hexadecimal, & Decimal ASCII Character Set (Complete)
  6692.  
  6693.  
  6694.  
  6695.  
  6696.               Hex   Oct   Dec   --      Description
  6697.  
  6698.               [C0]  300   192.          A with accent grave
  6699.               [C1]  301   193.          A with accent aigu (acute)
  6700.               [C2]  302   194.          A with circumflex
  6701.               [C3]  303   195.          A with tilde
  6702.               [C4]  304   196.          A with umlaut (diaeresis)
  6703.               [C5]  305   197.          A with ring
  6704.               [C6]  306   198.          AE ligature
  6705.               [C7]  307   199.          C with cedilla
  6706.  
  6707.               [C8]  310   200.          E with accent grave
  6708.               [C9]  311   201.          E with accent aigu (acute)
  6709.               [CA]  312   202.          E with circumflex
  6710.               [CB]  313   203.          E with umlaut (diaeresis)
  6711.               [CC]  314   204.          I with accent grave
  6712.               [CD]  315   205.          I with accent aigu (acute)
  6713.               [CE]  316   206.          I with circumflex
  6714.               [CF]  317   207.          I with umlaut (diaeresis)
  6715.  
  6716.               [D0]  320   208.          reserved for future
  6717.               [D1]  321   209.          N with tilde
  6718.               [D2]  322   210.          O with accent grave
  6719.               [D3]  323   211.          O with accent aigu (acute)
  6720.               [D4]  324   212.          O with circumflex
  6721.               [D5]  325   213.          O with tilde
  6722.               [D6]  326   214.          O with umlaut (diaeresis)
  6723.               [D7]  327   215.          OE ligature
  6724.  
  6725.               [D8]  330   216.          O (letter) with slash
  6726.               [D9]  331   217.          U with accent grave
  6727.               [DA]  332   218.          U with accent aigu (acute)
  6728.               [DB]  333   219.          U with circumflex
  6729.               [DC]  334   220.          U with umlaut (diaeresis)
  6730.               [DD]  335   221.          Y with umlaut (diaeresis)
  6731.               [DE]  336   222.          reserved for future
  6732.               [DD]  337   223.          German sharp s
  6733.  
  6734.  
  6735.  
  6736.  
  6737.      Continued...
  6738.  
  6739.      Standard TECO                                            PAGE 136
  6740.      Appendix A
  6741.  
  6742.  
  6743.                            APPENDIX A, Continued
  6744.  
  6745.  
  6746.        Octal, Hexadecimal, & Decimal ASCII Character Set (Complete)
  6747.  
  6748.  
  6749.  
  6750.  
  6751.               Hex   Oct   Dec   --      Description
  6752.  
  6753.               [E0]  340   224.          a with accent grave
  6754.               [E1]  341   225.          a with accent aigu (acute)
  6755.               [E2]  342   226.          a with circumflex
  6756.               [E3]  343   227.          a with tilde
  6757.               [E4]  344   228.          a with umlaut (diaeresis)
  6758.               [E5]  345   229.          a with ring
  6759.               [E6]  346   230.          ae ligature
  6760.               [E7]  347   231.          c with cedilla
  6761.  
  6762.               [E8]  350   232.          e with accent grave
  6763.               [E9]  351   233.          e with accent aigu (acute)
  6764.               [EA]  352   234.          e with circumflex
  6765.               [EB]  353   235.          e with umlaut (diaeresis)
  6766.               [EC]  354   236.          e with umlaut (diaeresis)
  6767.               [ED]  355   237.          i with accent aigu (acute)
  6768.               [EE]  356   238.          i with circumflex
  6769.               [EF]  357   239.          i with umlaut (diaeresis)
  6770.  
  6771.               [F0]  360   240.          reserved for future
  6772.               [F1]  361   241.          n with tilde
  6773.               [F2]  362   242.          o with accent grave
  6774.               [F3]  363   243.          o with accent aigu (acute)
  6775.               [F4]  364   244.          o with circumflex
  6776.               [F5]  365   245.          o with tilde
  6777.               [F6]  366   246.          o with umlaut (diaeresis)
  6778.               [F7]  367   247.          oe ligature
  6779.  
  6780.               [F8]  370   248.          o (letter) with slash
  6781.               [F9]  371   249.          u with accent grave
  6782.               [FA]  372   250.          u with accent aigu (acute)
  6783.               [FB]  373   251.          u with circumflex
  6784.               [FC]  374   252.          u with umlaut (diaeresis)
  6785.               [FD]  375   253.          y with umlaut (diaeresis)
  6786.               [FE]  376   254.          reserved for future
  6787.               [FF]  377   255.          -
  6788.  
  6789.      Standard TECO                                            PAGE 137
  6790.      Appendix B
  6791.  
  6792.  
  6793.                                 APPENDIX B
  6794.  
  6795.  
  6796.                               ERROR MESSAGES
  6797.  
  6798.      TECO error messages consist of a three letter message preceded by
  6799.      a question mark (?) or preceeded by ?TEC.  A short description of
  6800.      the error optionally follows (dependent on the current  value  of
  6801.      the  EH  flag).   Typing  ?  (question mark) immediately after an
  6802.      error message printout causes the command string to be printed up
  6803.      to  and  including  the character which causes the error message.
  6804.      Typing *q (asterisk, Q-register name) immediately after an  error
  6805.      message printout saves the entire command string in the specified
  6806.      Q-register.  This is especially useful  for  recovering  mistyped
  6807.      insert  commands.  Both the ?  and *q facilities may be used when
  6808.      an error occurs.
  6809.  
  6810.      TECO-11 also produces two warning messages.   These  messages  do
  6811.      not abort the command and execution continues.
  6812.  
  6813.  
  6814.      %Superseding existing file
  6815.                    Indicates that the file to be created as the result
  6816.                    of  an  EW  command  already exists.  If the output
  6817.                    file is closed the old copy of  the  file  will  be
  6818.                    deleted.  The EK command may be used to "take back"
  6819.                    the EW command.
  6820.  
  6821.      %Search fail in iter
  6822.                    Indicates that a search command has  failed  inside
  6823.                    iteration  brackets.   A  ;   (semi-colon)  command
  6824.                    immediately  following  the  search   command   can
  6825.                    typically  be used to suppress this message.  After
  6826.                    printing the message, the iteration is  terminated,
  6827.                    i.e., TECO simulates a 0;  command.
  6828.  
  6829.  
  6830.  
  6831.  
  6832.  
  6833.      These  error  messages  are  listed   alphabetically   by   their
  6834.      three-letter code.  In general, these three-letter codes have the
  6835.      same meaning on  all  implementations,  although  not  all  error
  6836.      messages are produced by each implementation.  The one-line error
  6837.      message given here is a paraphrasing of the message given,  which
  6838.      may differ slightly from system to system.
  6839.  
  6840.      Standard TECO                                            PAGE 138
  6841.      Appendix B
  6842.  
  6843.  
  6844.      ?ARG    Improper Arguments
  6845.                    Three arguments are given (a,b,c or H,c).
  6846.  
  6847.      ?BNI    > not in iteration
  6848.                    There is a close angle bracket not  matched  by  an
  6849.                    open  angle  bracket somewhere to its left.  (Note:
  6850.                    an iteration in a macro stored in a Q-register must
  6851.                    be complete within the Q-register.)
  6852.  
  6853.      ?CCL    CCL.SV not found or EG argument too long
  6854.                    The EGcommand` command on OS/8 was unable to locate
  6855.                    SYS:CCL.SV  or  the specified command has more than
  6856.                    46 characters.
  6857.  
  6858.      ?CON    Confused use of conditionals
  6859.                    Conditionals,    parenthesized    arguments,    and
  6860.                    iterations  must  be  properly  nested.   The  user
  6861.                    probably used  some  construct  like:   N"E...(...'
  6862.                    where  an  iteration  or  parenthesized argument is
  6863.                    begun in a conditional but not  terminated  in  the
  6864.                    same conditional.
  6865.  
  6866.      ?CPQ    Can't pop into Q-register
  6867.                    A ] command has been executed and there is  nothing
  6868.                    saved on the Q-register push down list.
  6869.  
  6870.      ?DEV    Invalid device
  6871.                    A  file  specification  string  in  an  E   command
  6872.                    contains an unknown device name.
  6873.  
  6874.      ?DTB    Delete too big
  6875.                    An nD command  has  been  attempted  which  is  not
  6876.                    contained within the current page.
  6877.  
  6878.      ?ERR    RSTS/E error message    (RSTS/E only)
  6879.                    Some RSTS/E monitor call failed.  The error message
  6880.                    text explains the error.
  6881.  
  6882.      ?FER    File Error
  6883.                    The file specified in an ER, EW or EB  command  was
  6884.                    not found.
  6885.  
  6886.      ?FNF    File not found "filespec"
  6887.                    The requested input file could not be located.   If
  6888.                    this  occurred within a macro the colon modified ER
  6889.                    or EB command may be necessary.
  6890.  
  6891.      ?FUL    Output Command would have overflowed output device
  6892.                    The page of text currently in the text buffer  will
  6893.                    not fit in the open output file.  Until enough free
  6894.                    space can be obtained on the output device the file
  6895.                    may  have  to be split.  An EF command to close the
  6896.                    current output file, followed by a new  EW  command
  6897.  
  6898.      Standard TECO                                            PAGE 139
  6899.      Appendix B
  6900.  
  6901.  
  6902.                    to  a temporary file may be used.  The files should
  6903.                    be  concatenated  when   the   space   problem   is
  6904.                    alleviated.
  6905.  
  6906.      ?ICE    Illegal ^E Command in Search Argument
  6907.                    A search argument contains a  ^E  command  that  is
  6908.                    either  not  defined or incomplete.  The only valid
  6909.                    ^E commands in search  arguments  are:   ^EA,  ^ED,
  6910.                    ^EV, ^EW, ^EL, ^ES, ^E<NNN>, and ^E[A,B,C,...].
  6911.  
  6912.      ?IEC    Illegal character "x" after E
  6913.                    An invalid E command  has  been  executed.   The  E
  6914.                    character must be followed by an alphabetic to form
  6915.                    a legal E command (i.e., ER or EX).
  6916.  
  6917.      ?IFC    Illegal character "x" after F
  6918.                    An invalid F command has been executed.
  6919.  
  6920.      ?IFN    Illegal character "x" in filename
  6921.                    The filespec  as  an  argument  to  one  of  the  E
  6922.                    commands  is  unacceptable to the system.  The file
  6923.                    specification must be appropriate to the system  in
  6924.                    use.
  6925.  
  6926.      ?IIA    Illegal insert arg
  6927.                    A command of  the  form  "nItext`"  was  attempted.
  6928.                    Combining   character   (nI`)   and  text  (Itext`)
  6929.                    insertions is illegal.
  6930.  
  6931.      ?ILL    Illegal command "x"
  6932.                    An attempt has been made to execute an invalid TECO
  6933.                    command.
  6934.  
  6935.      ?ILN    Illegal number
  6936.                    An 8 or 9 has been entered when the radix  of  TECO
  6937.                    is set to octal.
  6938.  
  6939.      ?INP    Input error
  6940.                    The system has reported an error attempting to read
  6941.                    the  current  input  file.   The text buffer may be
  6942.                    corrupt.  This operation may be retried, but if the
  6943.                    error  persists, you may have to return to a backup
  6944.                    file.
  6945.  
  6946.      ?IPA    Negative or 0 argument to P
  6947.                    The  argument  preceding  a  P  or  PW  command  is
  6948.                    negative or 0.
  6949.  
  6950.      ?IQC    Illegal " character
  6951.                    One of the valid " commands did not  follow  the ".
  6952.                    Refer   to   Section  5.14  (conditional  execution
  6953.                    commands) for the legal set of commands.
  6954.  
  6955.      Standard TECO                                            PAGE 140
  6956.      Appendix B
  6957.  
  6958.  
  6959.      ?IQN    Illegal Q-register name "x"
  6960.                    An illegal Q-register name was specified in one  of
  6961.                    the Q-register commands.
  6962.  
  6963.      ?IRA    Illegal radix argument to ^R
  6964.                    The argument to a ^R radix command must be  8,  10,
  6965.                    or 16.
  6966.  
  6967.      ?ISA    Illegal search arg
  6968.                    The argument preceding a search command is 0.  This
  6969.                    argument must not be 0.
  6970.  
  6971.      ?ISS    Illegal search string
  6972.                    One of the search string  special  characters  (^Q,
  6973.                    ^V, ^W, etc.) would have modified the search string
  6974.                    delimiter (usually ESCAPE).
  6975.  
  6976.      ?IUC    Illegal character "x" following ^
  6977.                    The character following an ^ must have ASCII  value
  6978.                    between  100  and  137 inclusive or between 141 and
  6979.                    172 inclusive.
  6980.  
  6981.      ?MAP    Missing '
  6982.                    Every conditional (opened with the " command)  must
  6983.                    be closed with the ' command.
  6984.  
  6985.      ?MEM    Memory overflow
  6986.                    Insufficient  memory  available  to  complete   the
  6987.                    current  command.   Make  sure  the Q-register area
  6988.                    does not contain much unnecessary  text.   Breaking
  6989.                    up  the  text  area  into  multiple  pages might be
  6990.                    useful.  (See section 5.19.)
  6991.  
  6992.      ?MLA    Missing Left Angle Bracket
  6993.                    There is a right angle bracket that has no matching
  6994.                    left  angle bracket.  An iteration must be complete
  6995.                    within the macro or command.
  6996.  
  6997.      ?MLP    Missing (
  6998.                    There is a right parenthesis that is not matched by
  6999.                    a corresponding left parenthesis.
  7000.  
  7001.      ?MRA    Missing Right Angle Bracket
  7002.                    There is a left angle bracket that has no  matching
  7003.                    right angle bracket.  An iteration must be complete
  7004.                    within the macro or command.
  7005.  
  7006.      ?MRP    Missing )
  7007.                    There is a right parenthesis that is not matched by
  7008.                    a corresponding left parenthesis.
  7009.  
  7010.      Standard TECO                                            PAGE 141
  7011.      Appendix B
  7012.  
  7013.  
  7014.      ?MSC    Missing Start of Conditional
  7015.                    A ' command (end of conditional)  was  encountered.
  7016.                    Every  '  command  must be matched by a preceding "
  7017.                    (start of conditional) command.
  7018.  
  7019.      ?NAB    No arg before ^_
  7020.                    The  ^_  command  must  be  preceded  by  either  a
  7021.                    specific numeric argument or a command that returns
  7022.                    a numeric value.
  7023.  
  7024.      ?NAC    No arg before ,
  7025.                    A command has been executed in which  a  ,  is  not
  7026.                    preceded by a numeric argument.
  7027.  
  7028.      ?NAE    No arg before =
  7029.                    The =, ==, or  ===  command  must  be  preceded  by
  7030.                    either  a  specific  numeric  argument or a command
  7031.                    that returns a numeric value.
  7032.  
  7033.      ?NAP    No arg before )
  7034.                    A ) parenthesis has been  encountered  and  is  not
  7035.                    properly preceded by a specific numeric argument or
  7036.                    a command that returns a numeric value.
  7037.  
  7038.      ?NAQ    No arg before "
  7039.                    The " commands must be preceded by a single numeric
  7040.                    argument  on  which  the  decision  to  execute the
  7041.                    following commands or skip to  the  matching  '  is
  7042.                    based.
  7043.  
  7044.      ?NAS    No arg before ;
  7045.                    The ;  command must be preceded by a single numeric
  7046.                    argument  on  which  the  decision  to  execute the
  7047.                    following commands or skip to  the  matching  >  is
  7048.                    based.
  7049.  
  7050.      ?NAU    No arg before U
  7051.                    The U command must be preceded by either a specific
  7052.                    numeric  argument  or  a  command  that  returns  a
  7053.                    numeric value.
  7054.  
  7055.      ?NCA    Negative argument to ,
  7056.                    A comma was preceded by a negative number.
  7057.  
  7058.      ?NYA    Numeric argument with Y
  7059.                    The Y command must not  be  preceded  by  either  a
  7060.                    numeric  argument  or  a  command  that  returns  a
  7061.                    numeric value.
  7062.  
  7063.      ?NYI    Not yet implemented
  7064.                    A command  was  issued  which  tries  to  invoke  a
  7065.                    feature  not  available  on  this implementation of
  7066.                    TECO.
  7067.  
  7068.      Standard TECO                                            PAGE 142
  7069.      Appendix B
  7070.  
  7071.  
  7072.      ?NFI    No file for input
  7073.                    Before issuing an input command, such as Y,  it  is
  7074.                    necessary to open an input file by use of a command
  7075.                    such as ER or EB.
  7076.  
  7077.      ?NFO    No file for output
  7078.                    Before issuing an output command such as  N  search
  7079.                    or  P it is necessary to open an output file by use
  7080.                    of a command such as EW or EB.
  7081.  
  7082.      ?NPA    Negative or 0 argument to P
  7083.                    A P  command  was  preceded  by  a  negative  or  0
  7084.                    argument.
  7085.  
  7086.      ?NRO    No room for output
  7087.                    The  output  device  is  too  full  to  accept  the
  7088.                    requested output file.
  7089.  
  7090.      ?NYI    Not Yet Implemented
  7091.                    A command was issued that is not yet implemented in
  7092.                    this version of TECO.
  7093.  
  7094.      ?OFO    Output file already open
  7095.                    A command has been executed which tried  to  create
  7096.                    an  output  file,  but  an output file currently is
  7097.                    open.  It is typically appropriate to use the EC or
  7098.                    EK  command as the situation calls for to close the
  7099.                    output file.
  7100.  
  7101.      ?OUT    Output error
  7102.                    The system has reported an error attempting  to  do
  7103.                    output  to  the output file.  Make sure that output
  7104.                    device did not become write locked.  Use of the  EF
  7105.                    command  (or EK if necessary) and another EW can be
  7106.                    considered until the condition is fixed.
  7107.  
  7108.      ?PES    Attempt to Pop Empty Stack
  7109.                    A ]  command  (pop  off  q-register  stack  into  a
  7110.                    q-register)  was encountered when there was nothing
  7111.                    on the q-register stack.
  7112.  
  7113.      ?PDO    Push-down list overflow
  7114.                    The  command  string  has   become   too   complex.
  7115.                    Simplify it.
  7116.  
  7117.      ?POP    Attempt to move Pointer Off Page with "x"
  7118.                    A J,  C  or  R  command  has  been  executed  which
  7119.                    attempted  to  move  the pointer off the page.  The
  7120.                    result of executing  one  of  these  commands  must
  7121.                    leave  the pointer between 0 and Z, inclusive.  The
  7122.                    characters referenced by a D or m,nX  command  must
  7123.                    also be within the buffer boundary.
  7124.  
  7125.      Standard TECO                                            PAGE 143
  7126.      Appendix B
  7127.  
  7128.  
  7129.      ?SNI    ; not in iteration
  7130.                    A ;  command has been executed outside of  an  open
  7131.                    iteration   bracket.   This  command  may  only  be
  7132.                    executed within iteration brackets.
  7133.  
  7134.      ?SRH    Search failure "text"
  7135.                    A search command not preceded by a  colon  modifier
  7136.                    and  not within an iteration has failed to find the
  7137.                    specified "text".  After  an  S  search  fails  the
  7138.                    pointer  is  left  at  the beginning of the buffer.
  7139.                    After an N or _ search fails the last page  of  the
  7140.                    input  file  has  been input and, in the case of N,
  7141.                    output, and the buffer is cleared.  In the case  of
  7142.                    an  N  search  it is usually necessary to close the
  7143.                    output file and reopen it for continued editing.
  7144.  
  7145.      ?STL    String too long
  7146.                    A search or file name string is too long.  This  is
  7147.                    most  likely  the result of a missing <DELIM> after
  7148.                    the string.
  7149.  
  7150.      ?TAG    Missing Tag !tag!
  7151.                    The tag !tag!  specified by an O command cannot  be
  7152.                    found.  This tag must be in the same macro level as
  7153.                    the O command referencing it.
  7154.  
  7155.      ?UTC    Unterminated command "x"
  7156.                    This is a general error which is usually caused  by
  7157.                    an   unterminated   insert,   search,  or  filespec
  7158.                    argument,   an   unterminated   ^A   message,    an
  7159.                    unterminated  tag  or comment (i.e., unterminated !
  7160.                    construct), or a missing ' character which closes a
  7161.                    conditional execution command.
  7162.  
  7163.      ?UTM    Unterminated macro
  7164.                    This error is the same as  the  ?UTC  error  except
  7165.                    that  the unterminated command was executing from a
  7166.                    Q-register (i.e., it  was  a  macro).   (Note:   An
  7167.                    entire command sequence stored in a Q-register must
  7168.                    be complete within the Q-register.)
  7169.  
  7170.      ?XAB    Execution aborted
  7171.                    Execution of TECO was aborted.  This is usually due
  7172.                    to the typing of <CTRL/C>.
  7173.  
  7174.      ?WLO    System Device Write-Locked
  7175.                    TECO-8 needs to write on the system device when  it
  7176.                    is  running in less than 16K (less than 20K if VT52
  7177.                    is present) so that it can later swap in overlays.
  7178.  
  7179.      ?YCA    Y command aborted
  7180.                    An attempt has been made  to  execute  an  Y  or  _
  7181.                    search command with an output file open, that would
  7182.  
  7183.      Standard TECO                                            PAGE 144
  7184.      Appendix B
  7185.  
  7186.  
  7187.                    cause text in the text buffer to be erased  without
  7188.                    outputting  it  to the output file.  The ED command
  7189.                    (section 5.16) controls this check.
  7190.  
  7191.      ?nnn    I/O Error or Directive Error              (RSX-11 only)
  7192.                    All errors from the executive and file  system  are
  7193.                    reported  in  this format, where nnn is the decimal
  7194.                    I/O or directive error  status.   The  accompanying
  7195.                    message  is  the  corresponding  message  from  the
  7196.                    QIOSYM message file.  A complete list  of  I/O  and
  7197.                    directive  errors  appears  in  appendices  to  the
  7198.                    various Executive  reference  manuals  and  in  the
  7199.                    IAS/RSX-11 I/O Operations Reference Manual.
  7200.  
  7201.      Standard TECO                                            PAGE 145
  7202.      Appendix C
  7203.  
  7204.  
  7205.                                 APPENDIX C
  7206.  
  7207.  
  7208.            Incompatible, Obsolete, and System-Specific Commands
  7209.  
  7210.      This appendix describes commands that are  peculiar  to  specific
  7211.      operating  systems.   These  commands  fall into many categories.
  7212.      Some are obsolete, and are kept around only as a  convenience  to
  7213.      the  user.   Others  are so system specific or so obscure that it
  7214.      was felt best not to include them in the main body of the manual.
  7215.      Some  are  incompatible  across  operating systems.  Some are new
  7216.      commands that have not become firmly established and  may  change
  7217.      in  the  future.  In general, use these commands at your own risk
  7218.      and with the understanding that in future releases of TECO, these
  7219.      commands  may change or go away completely.  Implementors of TECO
  7220.      on other operating systems should contact  the  TECO  SIG  before
  7221.      implementing any of these features.
  7222.  
  7223.  
  7224.      C.1 SPECIFIC FEATURES OF TECO-11
  7225.  
  7226.  
  7227.      C.1.1 TECO Commands
  7228.  
  7229.      Command        Description
  7230.  
  7231.      m,nStext`      Performs the same function as the nS command,  but
  7232.                     m  serves  a  bound  limit for the search.  If the
  7233.                     search string can  be  found  without  moving  the
  7234.                     pointer  more  than  ABS(m)-1  places,  the search
  7235.                     succeeds  and  the  pointer  is  repositioned   to
  7236.                     immediately   after  the  last  character  of  the
  7237.                     string.  Otherwise, the pointer is left unchanged.
  7238.                     The  ^Q  operator,  described  below, is useful in
  7239.                     conjunction with this command.
  7240.  
  7241.                     Note that m,Stext` is identical to  m,1Stext`  and
  7242.                     m,-Stext` is identical to m,-1Stext`.
  7243.  
  7244.      m,-nStext`     Performs the same function as  the  m,nS  command,
  7245.                     but searches in the reverse direction.
  7246.  
  7247.      0,nStext`      Performs the same  function  as  the  nS  command,
  7248.                     except  that  the  pointer  position  will  remain
  7249.                     unchanged on search string failure.   (Essentially
  7250.                     an  unbounded  search  with no pointer movement on
  7251.                     failure.)
  7252.  
  7253.      G*             Get most recent  filespec  string.   The  asterisk
  7254.                     represents  TECO's  filespec  string  area,  which
  7255.                     contains the fully expanded filespec of the last E
  7256.                     command  (see  appendices).   Copy the contents of
  7257.                     the filespec string area into the  buffer  at  the
  7258.  
  7259.      Standard TECO                                            PAGE 146
  7260.      Appendix C
  7261.  
  7262.  
  7263.                     current  position  of  the buffer pointer, leaving
  7264.                     the pointer positioned after  the  last  character
  7265.                     copied.
  7266.  
  7267.      :G*            Print the contents of the filespec buffer  on  the
  7268.                     terminal.
  7269.  
  7270.      G_             Get most recent  search  string.   The  underscore
  7271.                     (backarrow)  represents TECO's search string area.
  7272.                     Copy the contents of the search string  area  into
  7273.                     the  buffer  at the current position of the buffer
  7274.                     pointer, leaving the pointer positioned after  the
  7275.                     last character copied.
  7276.  
  7277.      :G_            Print the contents of the search string buffer  on
  7278.                     the terminal.
  7279.  
  7280.      n^Q            n^QC is identical to nL.  The n^Q command  returns
  7281.                     the   number  of  characters  between  the  buffer
  7282.                     pointer and the nth line separator (both  positive
  7283.                     and   negative).    This   command  converts  line
  7284.                     oriented command argument  values  into  character
  7285.                     oriented   argument   values.    Used   after   an
  7286.                     expression.
  7287.  
  7288.      m,-256+n:W     Inserts characters at "dot"  until...   Characters
  7289.                     are read (echo off) from the terminal and inserted
  7290.                     at "dot" until and  according  to  the  microcoded
  7291.                     bits  in  n.   The  terminating  character  is not
  7292.                     inserted.
  7293.  
  7294.                       128 => Return immediately if no typed characters
  7295.                        64 => Terminate on any character
  7296.                        32 => Don't keep screen updated (i.e., no -1W)
  7297.                         8 => Treat m as terminating character(s)
  7298.                         4 => Convert any alphabetic inserts  to  upper
  7299.                              case
  7300.                         2 => Terminate on <TAB>
  7301.                         1 => Screen is initially O.K.
  7302.  
  7303.                     Control characters (octal 0  through  37  and  177
  7304.                     except  <TAB>)  are always terminating characters.
  7305.                     The returned value has the  terminating  character
  7306.                     code  in  low byte (octal 0 through 177 or 377 for
  7307.                     returned immediately).  The sign bit is set if one
  7308.                     or  more  inserts were done.  The return value may
  7309.                     be a character code that normally would have  been
  7310.                     inserted,  but could not be for some reason (e.g.,
  7311.                     convert   alphabetic   inserts   to   upper   case
  7312.                     requested,    but    not    supported    in   this
  7313.                     implementation).
  7314.  
  7315.                     The m of m,-256+n:W is always  optional.   If  bit
  7316.  
  7317.      Standard TECO                                            PAGE 147
  7318.      Appendix C
  7319.  
  7320.  
  7321.                     value  8  of  n  is  set,  m  contains  up  to two
  7322.                     additional termination character codes, one in the
  7323.                     low  8  bits  (low byte) and another in the high 8
  7324.                     bits (high byte).  If only one  extra  termination
  7325.                     character  is  desired, it is placed simply placed
  7326.                     in m thus setting the high 8 bits to  zero  (which
  7327.                     is already a termination character).  If bit value
  7328.                     8 of n is not  set,  passing  the  m  argument  is
  7329.                     undefined...
  7330.  
  7331.  
  7332.      C.1.2 String Build Constructs
  7333.  
  7334.      Construct      Description
  7335.  
  7336.      <CTRL/E>Q*     <CTRL/E>Q* indicates that the string stored in the
  7337.                     filespec  buffer  is  to  be  used in the position
  7338.                     occupied by the ^EQ* in the search string.
  7339.  
  7340.      <CTRL/E>Q_     <CTRL/E>Q_ indicates that the string stored in the
  7341.                     search string buffer is to be used in the position
  7342.                     occupied by the ^EQ_ in the search string.
  7343.  
  7344.      Standard TECO                                            PAGE 148
  7345.      Appendix C
  7346.  
  7347.  
  7348.      C.2 SPECIFIC FEATURES OF RT-11
  7349.  
  7350.      [For "RT-11 Operating Characteristics", refer to Appendix D.]
  7351.  
  7352.  
  7353.      C.3 SPECIFIC FEATURES OF RSTS/E
  7354.  
  7355.      [For "RSTS/E Operating Characteristics", refer to Appendix E.]
  7356.  
  7357.                             TECO COMMANDS
  7358.  
  7359.      Command        Description
  7360.  
  7361.      :EGRTS`        Switch to private default run-time-system.
  7362.  
  7363.      :EGRTS foo`    Switch to RTS "foo".
  7364.  
  7365.      :EGFSS string` File string scan "string".
  7366.  
  7367.      :EGCCL cmd`    Try "cmd" as a CCL command.
  7368.  
  7369.      :EGRUN file`   Try to run "file".
  7370.  
  7371.      :EGRUN file=xx`
  7372.                     Try to run "file" with "xx" placed in core common.
  7373.  
  7374.      :EGEMT`        Issue a monitor directive.  The  FIRQB  is  loaded
  7375.                     from Q-registers A through P and the XRB is loaded
  7376.                     from Q-registers Q through W.  The low byte of the
  7377.                     value  in  Q-register A is the monitor EMT code to
  7378.                     issue.   If  the  high  byte  of  the   value   in
  7379.                     Q-register   A   is  >0  then  the  text  part  of
  7380.                     Q-register A is put into the  XRB  for  a  'write'
  7381.                     (XRLEN=  size of A, XRBC=size of A, XRLOC->A);  if
  7382.                     Q-register A high byte is <0 then the text part of
  7383.                     Q-register  A  is  put  into  the XRB for a 'read'
  7384.                     (XRLEN=size of A, XRBC=0, XRLOC->A).
  7385.                     Returned  value  is  -1   for   success,   0   for
  7386.                     unrecognized  command,  or >0 for the RSTS/E error
  7387.                     code.  The FIRQB is placed in the numeric part  of
  7388.                     Q-regs  A,  B, C, D, E, F, G, H, I, J, K, L, M, N,
  7389.                     O, P.  The XRB is placed in the  numeric  part  of
  7390.                     Q-regs Q, R, S, T, U, V, W.
  7391.  
  7392.      See also section 5.1.2, File Specification Switches.
  7393.  
  7394.      Standard TECO                                            PAGE 149
  7395.      Appendix C
  7396.  
  7397.  
  7398.      C.4 SPECIFIC FEATURES OF RSX-11/M, RSX-11/D, and IAS
  7399.  
  7400.      [For "RSX-11 Operating Characteristics", refer to Appendix F.]
  7401.  
  7402.      Command        Description
  7403.  
  7404.      <CTRL/Z><CTRL/Z><CTRL/Z>
  7405.                     Returns   control   to   the   operating    system
  7406.                     immediately.        Equivalent      to      typing
  7407.                     <CTRL/C><CTRL/C>.
  7408.  
  7409.      See also section 5.1.2, File Specification Switches.
  7410.  
  7411.  
  7412.      C.5 SPECIFIC FEATURES OF VAX/VMS
  7413.  
  7414.      [For "VAX/VMS Operating Characteristics", refer to Appendix G.]
  7415.  
  7416.      Command        Description
  7417.  
  7418.      <CTRL/Z><CTRL/Z><CTRL/Z>
  7419.                     Returns   control    to    VAX/VMS    immediately.
  7420.                     Equivalent to typing <CTRL/C><CTRL/C>.
  7421.  
  7422.      EG`            Exit with special status
  7423.                     TECO's normal exit status code  (as  reflected  by
  7424.                     the  DCL  symbols  $STATUS  and  $SEVERITY)  is  1
  7425.                     (success).  If the exit was due to an EG` command,
  7426.                     the exit status code is 9 (also success).
  7427.  
  7428.      :EGSYM symbol_name symbol_value`
  7429.                     Defines the DCL local symbol "symbol_name" with  a
  7430.                     value   string   of  "symbol_value".   Useful  for
  7431.                     creating symbols that will be used  by  a  command
  7432.                     procedure upon TECO's exit.
  7433.  
  7434.      See also section 5.1.2, File Specification Switches.
  7435.  
  7436.  
  7437.      C.6 SPECIFIC FEATURES OF OS/8
  7438.  
  7439.      [For "OS/8 Operating Characteristics", refer to Appendix H.]
  7440.  
  7441.      Command        Description
  7442.  
  7443.      <CTRL/S>       If  used  as  the  first  keystroke  after  TECO's
  7444.                     prompt,  this  command is the same as *Z, that is,
  7445.                     it saves the last command string in Q-register  Z.
  7446.                     This  command echoes as *Z and does not have to be
  7447.                     followed by a <DELIM>.
  7448.  
  7449.      See also section 5.1.2, File Specification Switches.
  7450.  
  7451.      Standard TECO                                            PAGE 150
  7452.      Appendix C
  7453.  
  7454.  
  7455.      C.7 SPECIFIC FEATURES OF TOPS-10
  7456.  
  7457.      [For "TOPS-10 Operating Characteristics", refer to Appendix I.]
  7458.  
  7459.      Command        Description
  7460.  
  7461.      nEM            Positions a magtape.  You must  open  the  magtape
  7462.                     for input with an appropriate ER command before it
  7463.                     can be positioned.  Exact positioning  depends  on
  7464.                     the  value  of  n,  as  described below.  You must
  7465.                     reopen the  magtape  for  output  before  you  can
  7466.                     output to it.
  7467.                     [TECO-10 only]
  7468.  
  7469.                       Value   Action
  7470.  
  7471.                       1EM     Rewind  the   currently-selected   input
  7472.                               magtape  to load point.  EM is identical
  7473.                               to 1EM.
  7474.  
  7475.                       3EM     Write an end-of-file record.
  7476.  
  7477.                       6EM     Skip ahead one record.
  7478.  
  7479.                       7EM     Back up one record.
  7480.  
  7481.                       8EM     Skip  ahead  to  logical  end  of   tape
  7482.                               (defined  by  two successive end-of-file
  7483.                               marks).  Leave  the  magtape  positioned
  7484.                               between  the  two  end-of-file  marks so
  7485.                               that   successive    output    correctly
  7486.                               overwrites the second EOF.
  7487.  
  7488.                       9EM     Rewind and unload.
  7489.  
  7490.                       11EM    Write 3 inches of blank tape.
  7491.  
  7492.                       14EM    Advance tape one file.  This leaves  the
  7493.                               tape  positioned  so  that the next item
  7494.                               read will be the  first  record  of  the
  7495.                               next  file  (or  the  second end-of-file
  7496.                               mark at the logical end-of-tape).
  7497.  
  7498.                       15EM    Backspace tape one  file.   This  leaves
  7499.                               the  tape  positioned  so  that the next
  7500.                               item read will be the  end-of-file  mark
  7501.                               preceding   the   file  backspaced  over
  7502.                               (unless the file is the  first  file  on
  7503.                               the tape).
  7504.  
  7505.      n^Q            n^QC is identical to nL.  This command returns the
  7506.                     number  of  characters  between the buffer pointer
  7507.                     and the nth  line  separator  (both  positive  and
  7508.  
  7509.      Standard TECO                                            PAGE 151
  7510.      Appendix C
  7511.  
  7512.  
  7513.                     negative).   This  command  converts line oriented
  7514.                     command argument values  into  character  oriented
  7515.                     argument values.  Used after an expression.
  7516.  
  7517.      F0             Pointer position of start of window.  Same as 6:W.
  7518.  
  7519.      FZ             Pointer position of end of window.
  7520.  
  7521.      FH             Same as F0,FZ.
  7522.  
  7523.      FX             Software  maintained  horizontal   coordinate   of
  7524.                     location  of cursor on screen (0-origin).  Updated
  7525.                     by  TECO  on  terminal  output.   If  TECO  cannot
  7526.                     determine the updated location of the cursor, this
  7527.                     value is set to -1.
  7528.  
  7529.      nFX            Set value of FX register to n.
  7530.  
  7531.      FY             Software   maintained   vertical   coordinate   of
  7532.                     location  of cursor on screen (0-origin).  Updated
  7533.                     by  TECO  on  terminal  output.   If  TECO  cannot
  7534.                     determine the updated location of the cursor, this
  7535.                     value is set to -1.
  7536.  
  7537.      nFY            Set value of FY register to n.
  7538.  
  7539.      FP             Equivalent to FY,FX.
  7540.  
  7541.      m,nFP          Equivalent to mFYnFX.
  7542.  
  7543.      m,nFF          Updates FY and FX registers as if the m,nT command
  7544.                     were executed.
  7545.  
  7546.      nFF            Assumes that the scope cursor is pointing  at  the
  7547.                     character  that  is  just to the right of the text
  7548.                     buffer pointer (the current character).  Then this
  7549.                     command  advances  n  screen lines and goes to the
  7550.                     end  of  that  line  and  returns   that   pointer
  7551.                     position.
  7552.  
  7553.      nFQq           Compares  characters   beginning   at   dot   with
  7554.                     characters  beginning  at  the  nth  character  in
  7555.                     Q-register q (0-origin).  When a  match  fails  or
  7556.                     the  match ends, this command moves the pointer to
  7557.                     after the last character that matched and  returns
  7558.                     the index into the Q-register.
  7559.  
  7560.      E=filespec`    Renames the input file.
  7561.  
  7562.      E&filespec`    Run the specified program when  TECO  exits.   Can
  7563.                     take  a  numeric argument which is the run-offset.
  7564.                     0 is the default.
  7565.  
  7566.      Standard TECO                                            PAGE 152
  7567.      Appendix C
  7568.  
  7569.  
  7570.      m,nE*          Does an arbitrary TRMOP to your terminal.
  7571.                     [Not available on TOPS-20.]
  7572.  
  7573.      ::Gq           Same as :Gq but types literally.
  7574.  
  7575.      ::ER           Same as ER but no defaults are used.
  7576.  
  7577.      ^Z             Closes output file and exits from TECO.
  7578.  
  7579.      ^P             Returns current page number.
  7580.  
  7581.      n^P            Executes P commands until page n has been reached.
  7582.  
  7583.      n^Y            Executes Y commands until page n has been reached.
  7584.  
  7585.      n,m=           Same as m=n^T.
  7586.  
  7587.      m,n:^T         Does an arbitrary TTCALL.
  7588.  
  7589.  
  7590. See also section 5.1.2, File Specification Switches.
  7591.  
  7592.      Standard TECO                                            PAGE 153
  7593.      Appendix D
  7594.  
  7595.  
  7596.                                 APPENDIX D
  7597.  
  7598.  
  7599.                       RT-11 OPERATING CHARACERISTICS
  7600.  
  7601.  
  7602.      D.1 STARTUP
  7603.  
  7604.      TECO is started with the
  7605.  
  7606.                .R TECO
  7607.  
  7608.      command.  TECO is now immediately ready to accept commands.   The
  7609.      text buffer and Q-register areas are empty.
  7610.  
  7611.      The EDIT command
  7612.  
  7613.                .EDIT/TECO filespec
  7614.  
  7615.      is used to edit an already existing file.  It is equivalent to
  7616.  
  7617.                .R TECO
  7618.                *EBfilespec`Y``
  7619.  
  7620.      For those RT-11 users that will use TECO as the primary editor, a
  7621.      monitor SET command is provided:
  7622.  
  7623.                .SET EDITOR TECO
  7624.  
  7625.      Once this command is issued, the /TECO option on the EDIT command
  7626.      is  no  longer  necessary  since  the default editor is now TECO.
  7627.      Since this SET command only has affect between system bootstraps,
  7628.      it  is  recommended that the command be placed in the appropriate
  7629.      startup file (e.g., STARTS.COM).
  7630.  
  7631.      Now, assuming the SET command has been issued, the command
  7632.  
  7633.                .EDIT filespec
  7634.  
  7635.      can be used to edit an already existing file.
  7636.  
  7637.      The standard RT-11 EDIT command options are  all  available  with
  7638.      TECO.
  7639.  
  7640.                .EDIT/CREATE filespec
  7641.                .EDIT/INSPECT filespec
  7642.                .EDIT/OUTPUT:filespec filespec
  7643.  
  7644.      Another option, /EXECUTE, is also available:
  7645.  
  7646.                .EDIT/EXECUTE[:string] filespec
  7647.  
  7648.      The /EXECUTE option causes TECO to process the filespec  (assumed
  7649.  
  7650.      Standard TECO                                            PAGE 154
  7651.      Appendix D
  7652.  
  7653.  
  7654.      .TEC  filetype)  as a set of TECO commands.  If "string" is used,
  7655.      the string is  placed  into  TECO's  text  buffer.   If  "string"
  7656.      contains  only  alphanumeric  characters,  it does not have to be
  7657.      enclosed in quotes.  If it is  to  contain  blanks,  it  must  be
  7658.      quoted with single quotes.  The equivalent TECO commands would be
  7659.  
  7660.                .R TECO
  7661.                *ERfilespec`YHXZHKIstring`MZ``
  7662.  
  7663.      Note the input file remains open and can provide  more  input  to
  7664.      the macro.
  7665.  
  7666.  
  7667.      D.2 FILE SPECIFICATION
  7668.  
  7669.      The file access commands  ER,  EB,  EI,  and  EW  accept  a  file
  7670.      specification in the standard RT-11 format:
  7671.  
  7672.                dev:filename.type
  7673.  
  7674.      in which dev:  is a physical  device  name  or  a  user  assigned
  7675.      logical  name;   if  dev:   is not specified, the default DK:  is
  7676.      assumed.  The filename field must be specified  in  the  commands
  7677.      ER, EB, EI, and EW and be a legal RT-11 filename.  The type field
  7678.      is a file extension and must be explicitly given if  used  (there
  7679.      is  no default).  The EB and EW commands also accept the extended
  7680.      notation for an output file size
  7681.  
  7682.                dev:filename.type[n]
  7683.  
  7684.      The optional [n] specifies the output file size where  n  is  the
  7685.      number of blocks to be allocated.
  7686.  
  7687.  
  7688.      D.3 BACKUP FILES
  7689.  
  7690.      The EB command maintains one level of file backup on RT-11.   The
  7691.      pre-edited input file name is changed to
  7692.  
  7693.                filename.BAK
  7694.  
  7695.      before the new output file is  closed  with  the  original  name.
  7696.      Only normal file closing commands (EC, EF, EG, and EX) cause this
  7697.      renaming to happen.  If TECO is aborted or  the  output  file  is
  7698.      purged  by  the EK command, the input filename remains unchanged.
  7699.      Note only one .BAK file for a given name is kept;   earlier  .BAK
  7700.      backup files are deleted each time a new backup file is created.
  7701.  
  7702.      A good policy to follow when editing is to close the edited  file
  7703.      frequently  enough so that an unexpected incident would not cause
  7704.      a substantial loss of work.  Files should be backed up regularly.
  7705.      TECO  has the power to let an unsuspecting user alter a good file
  7706.      into a completely useless state.  The SRCCOM program can be  used
  7707.  
  7708.      Standard TECO                                            PAGE 155
  7709.      Appendix D
  7710.  
  7711.  
  7712.      to verify an editing session.
  7713.  
  7714.  
  7715.      D.4 EXIT AND GO
  7716.  
  7717.      If TECO is exited via the EGstring` command, the string is passed
  7718.      to the system as the next command to execute.  This string may be
  7719.      any valid command or an indirect command file specification.
  7720.  
  7721.  
  7722.      D.5 REENTER AND CLOSE
  7723.  
  7724.      The RT-11 REENTER command may always be used  to  continue  TECO.
  7725.      Its primary differences from running TECO is that when REENTER is
  7726.      used, the text buffer and Q-register  areas  are  unmodified,  as
  7727.      opposed  to when TECO is run the text buffer and Q-register areas
  7728.      are cleared.  The input and output  file  are  always  lost  upon
  7729.      reentering  TECO.   If  an output file was open before reentering
  7730.      TECO, the file will have to be  recreated  with  the  appropriate
  7731.      E-command.   (Note that the monitor commands GT ON, GT OFF, LOAD,
  7732.      and UNLOAD disallow a REENTER.)
  7733.  
  7734.      The output file is not closed if  TECO  is  aborted.   The  RT-11
  7735.      CLOSE  command can be used to make the output file permanent, but
  7736.      be aware that the output file will not  be  complete  because  of
  7737.      internal  buffers that TECO keeps.  TECO may be reentered after a
  7738.      CLOSE command.
  7739.  
  7740.  
  7741.      D.6 FILE RECOVERY
  7742.  
  7743.      TECO can be a useful tool in recovering ASCII  files  lost  on  a
  7744.      block  replaceable device.  TECO allows block replaceable devices
  7745.      to be opened in a non-file structured mode.  This gives the  user
  7746.      the  capability  to open a disk and access ASCII data anywhere on
  7747.      it, independent of file boundaries.  The command
  7748.  
  7749.                ERdev:`
  7750.  
  7751.      is used to open the  device  at  which  point  _  (underscore  or
  7752.      backarrow) searches may be used to locate specific ASCII data and
  7753.      transfer it to new output files.  Note that  files  tend  to  get
  7754.      reproduced,  in whole or part, many places on a block replaceable
  7755.      device;  be sure to verify that any given text is indeed complete
  7756.      and the correct version.
  7757.  
  7758.  
  7759.      D.7 SYSTEM CRASH RECOVERY
  7760.  
  7761.      TECO and RT-11 are highly reliable, but if  during  an  important
  7762.      edit  session a random system failure should occur, the following
  7763.      procedure may help save some or all of the editing.
  7764.  
  7765.      Standard TECO                                            PAGE 156
  7766.      Appendix D
  7767.  
  7768.  
  7769.           1.  Bootstrap the system
  7770.  
  7771.           2.  Immediately perform a SAVE command to save  as  much  of
  7772.               memory  as  possible  into  a  file on SY:.  The address
  7773.               range form of the SAVE command must be used.   The  SAVE
  7774.               command  will  not  allow  any part of the monitor to be
  7775.               saved, e.g., if you have a 28K system and are running SJ
  7776.               you cannot save 28K but only 26.3K.
  7777.  
  7778.           3.  Perform standard startup procedures, e.g., DATE.
  7779.  
  7780.           4.  Use TECO on the SAVEd file to  try  and  recover  useful
  7781.               parts of the edit.
  7782.  
  7783.  
  7784.      D.8 VT11 GRAPHICS SUPPORT
  7785.  
  7786.      If the monitor supports the VT11 graphics  processor  (GT ON  and
  7787.      GT OFF  work)  TECO  will automatically start up in display mode,
  7788.      adjusting to both the size of  the  display  screen  and  to  the
  7789.      presence or absence of the scroller.
  7790.  
  7791.      If the display fails to start  with  a  working  VT11,  TECO  has
  7792.      decided  that  there  is  not  enough  free  memory  and will not
  7793.      allocate the display file buffer or start the display.
  7794.  
  7795.      See Section 5.17 for a description of the available  commands  to
  7796.      interact with the display.
  7797.  
  7798.      Various aspects of the display screen become immediately  obvious
  7799.      upon  seeing  them;  the text pointer, its position and shape and
  7800.      its  position  between  lines;   wrap  around  of  more  than  72
  7801.      characters  per  line;   the  scroller  interaction  and  so  on.
  7802.      Experiment with a scratch file for more familiarity.
  7803.  
  7804.      Standard TECO                                            PAGE 157
  7805.      Appendix E
  7806.  
  7807.  
  7808.                                 APPENDIX E
  7809.  
  7810.  
  7811.                       RSTS/E OPERATING CHARACERISTICS
  7812.  
  7813.  
  7814.      E.1 STARTUP
  7815.  
  7816.      RSTS supports all  of  the  standard  TECO  invocation  commands,
  7817.      namely
  7818.  
  7819.                TECO
  7820.                TECO filespec
  7821.                TECO filespec=filespec
  7822.                MAKE filespec
  7823.                MUNG filespec
  7824.                MUNG filespec,text
  7825.  
  7826.      The CCL command switches /DETACH and /SIZE:n (or /SIZE:+n) can be
  7827.      used  with  TECO.  If /DETACH is used and the user's detached-job
  7828.      quota has not yet been reached, TECO will detach the  job  before
  7829.      any further processing.  If /SIZE:n is used, TECO will pre-expand
  7830.      the text and Q-register storage area to nK.  If /SIZE:+n is used,
  7831.      TECO  will  set  the  text storage and Q-register storage area to
  7832.      n+4K initially (TECO's default startup size is 4K).
  7833.  
  7834.  
  7835.      E.2 FILE SPECIFICATION
  7836.  
  7837.      The file access commands  ER,  EB,  EW,  and  EI  accept  a  file
  7838.      specification in the standard RSTS/E format:
  7839.  
  7840.                dev:[p,pn]filename.ext
  7841.  
  7842.      in which dev:  is a physical device  name  or  a  logical  device
  7843.      name;   if  dev:   is  not  specified,  the  public  structure is
  7844.      assumed.  If [p,pn] is not specified, the user's  current  logged
  7845.      in  account  is  assumed.   The  filename field must be specified
  7846.      whenever the device name references  a  file  structured  device.
  7847.      The  .ext  field is a file extension and must be explicitly given
  7848.      if used.  There is no default extension except  for  EI  commands
  7849.      which default the .ext field to .TEC.
  7850.  
  7851.      The file specification switches  /n,  /B+,  /,  and  /B2  may  be
  7852.      applied  to  the  ER, EW, and EB commands.  These switches invoke
  7853.      special  handling  of  program  lines  containing   <LF>   or   &
  7854.      continuation characters.  See Appendix J for more information.
  7855.  
  7856.      The file specification switch /B causes TECO to handle  the  file
  7857.      as  a  stream  of  8-bit  binary characters;  normal ASCII format
  7858.      processing (such as removal of null characters) is not done.
  7859.  
  7860.      The   file   specification   switches   /RONLY,   /MODE:n,    and
  7861.  
  7862.      Standard TECO                                            PAGE 158
  7863.      Appendix E
  7864.  
  7865.  
  7866.      /CLUSTERSIZE:n  can  be  included  in a file specification.  TECO
  7867.      automatically opens any disk input file in /RONLY mode.  The file
  7868.      size  switches /FILESIZE:n and /SIZE:n might leave an output file
  7869.      larger than the amount of data output by TECO.  These  file  size
  7870.      switches  are  therefore illegal and produce an error if included
  7871.      in a file specification.
  7872.  
  7873.      The EB and EW commands also accept the extended notation  for  an
  7874.      output file protection code
  7875.  
  7876.                dev:[p,pn]filename.ext<prot>
  7877.  
  7878.      The optional <prot> specifies the output file protection code.
  7879.  
  7880.  
  7881.      E.3 BACKUP FILES
  7882.  
  7883.      The EB command maintains one level of file backup on RSTS/E.  The
  7884.      pre-edited input file name is changed to
  7885.  
  7886.                filename.BAK
  7887.  
  7888.      before the new output file is  closed  with  the  original  name.
  7889.      Only normal file closing commands (EC, EF, EG, and EX) cause this
  7890.      renaming to happen.  If TECO is aborted or  the  output  file  is
  7891.      purged  by  the EK command, the input filename remains unchanged.
  7892.      Note only one .BAK file for a given name is kept;   earlier  .BAK
  7893.      backup files are deleted each time a new backup file is created.
  7894.  
  7895.      A good policy to follow when editing is to close the edited  file
  7896.      frequently  enough so that an unexpected incident would not cause
  7897.      a substantial loss of work.  Files should be backed up regularly.
  7898.      TECO  has the power to let an unsuspecting user alter a good file
  7899.      into a completely useless state.  The FILCOM program can be  used
  7900.      to verify an editing session.
  7901.  
  7902.  
  7903.      E.4 EXIT AND GO
  7904.  
  7905.      If TECO is exited via the  EGstring`  command,  the  "string"  is
  7906.      executed  as  a  RSTS/E  CCL  command  after the input and output
  7907.      file(s) are closed.
  7908.  
  7909.  
  7910.      E.5 ET FLAG HANDLING
  7911.  
  7912.      Bit 6 (detach) is handled specially by TECO.  Every time  the  ET
  7913.      flag  is  read (used as a numeric value), TECO ensures that Bit 6
  7914.      is on if the job is attached or off if the job is detached.  This
  7915.      allows  a  TECO macro to check for "detachedness".  If an attempt
  7916.      is made to set Bit 6 and the user's detached-job quota  has  been
  7917.      reached,  the  request is ignored and Bit 6 will read back as a 0
  7918.      (assuming the job is attached).  If Bit 6 is set and  the  user's
  7919.  
  7920.      Standard TECO                                            PAGE 159
  7921.      Appendix E
  7922.  
  7923.  
  7924.      detached-job  quota has not yet been reached, the job will become
  7925.      detached.  Further reading of Bit 6 will return a  1,  indicating
  7926.      the detached condition.
  7927.  
  7928.      Standard TECO                                            PAGE 160
  7929.      Appendix F
  7930.  
  7931.  
  7932.                                 APPENDIX F
  7933.  
  7934.  
  7935.                       RSX-11 OPERATING CHARACERISTICS
  7936.  
  7937.  
  7938.      F.1 STARTUP
  7939.  
  7940.      RSX-11 systems  support  all  of  the  standard  TECO  invocation
  7941.      commands, namely
  7942.  
  7943.                TECO
  7944.                TECO filespec
  7945.                TECO filespec=filespec
  7946.                MAKE filespec
  7947.                MUNG filespec
  7948.                MUNG filespec,text
  7949.  
  7950.      If any of these commands are not recognized by the system,  check
  7951.      with your system manager to see that TECO is properly installed.
  7952.  
  7953.      TECO macros may also be invoked with the command
  7954.  
  7955.                TECO @filespec
  7956.  
  7957.      It is exactly equivalent to
  7958.  
  7959.                MUNG filespec
  7960.  
  7961.      In systems supporting dynamic task expansion,  TECO  will  expand
  7962.      its  buffer space as necessary.  Also, TECO'S buffer space may be
  7963.      explicitly allocated in the startup command
  7964.  
  7965.                RUN $TEC/INC=n
  7966.  
  7967.  
  7968.      F.2 INITIALIZATION
  7969.  
  7970.      TECO searches for  the  TECO.INI  startup  file  in  the  current
  7971.      default  device  and  directory.  TECO's memory, in which a plain
  7972.      TECO command edits the file last edited with a TECO filespec or a
  7973.      MAKE   filespec   command,  is  implemented  with  a  file  named
  7974.      TECF00.TMP,  also  stored  in  the  current  default  device  and
  7975.      directory.
  7976.  
  7977.      The initial value of the ED flag is always 1.
  7978.  
  7979.      When TECO is initially invoked it will automatically set  the  ET
  7980.      and  EU  flags  according to the user's terminal characteristics.
  7981.      If the terminal supports CRT style rubouts, then bit 1 of the  ET
  7982.      flag  is  set  to  do the same in TECO.  If the terminal supports
  7983.      lower case type in, then bit 2 of the ET flag is set and  the  EU
  7984.      flag  is set to -1 to turn off case flagging.  If the terminal is
  7985.  
  7986.      Standard TECO                                            PAGE 161
  7987.      Appendix F
  7988.  
  7989.  
  7990.      a CRT type terminal and the version of TECO includes  the  screen
  7991.      support  package,  then  bit  9 of the ET flag is set.  While the
  7992.      command line is being processed, bit 7 of the ET flag is also set
  7993.      to  cause  TECO  to  exit  should any errors occurr.  ET bit 7 is
  7994.      cleared every time TECO reaches prompt (*) level.
  7995.  
  7996.  
  7997.      F.3 FILE SPECIFICATION
  7998.  
  7999.      The file access commands  ER,  EB,  EW,  and  EI  accept  a  file
  8000.      specification in the standard RSX-11 format:
  8001.  
  8002.                dev:[p,pn]filename.typ;version
  8003.  
  8004.      in which dev:  is a physical device  name  or  a  logical  device
  8005.      name;   if dev:  is not specified, SY:  is assumed.  If [p,pn] is
  8006.      not specified, the user's current default directory  is  assumed.
  8007.      The  filename  field  must  be specified whenever the device name
  8008.      references a file structured device.  The typ  field  is  a  file
  8009.      type  and  must be explicitly given if used.  There is no default
  8010.      type except for EI commands which default the .typ field to .TEC.
  8011.  
  8012.      The /B2 file specification switch may be applied to the  ER,  EW,
  8013.      and  EB  commands  and  invokes special handling of program lines
  8014.      containing & continuation characters.  See Appendix  J  for  more
  8015.      information.
  8016.  
  8017.      The switch /RW may be applied to any file specification in an ER,
  8018.      EW,  and  EI  command.   If  the  file specification references a
  8019.      magtape, the tape is rewound before the  file  is  opened.   Note
  8020.      that  for  output files, this has the effect of zeroing the tape.
  8021.      The /RW switch is ignored for all other device types.
  8022.  
  8023.      The  presence  of  version  numbers  in  Files-11   causes   file
  8024.      processing to behave slightly differently under RSX-11 than under
  8025.      other operating systems.  For example, no .BAK  files  are  used;
  8026.      each  execution of an EB command simply produces a new version of
  8027.      the file.  Thus a user may retain any level of backup he feels to
  8028.      be  comfortable.  It also means that one must occasionally delete
  8029.      obsolete files to avoid cluttering the disk.  Thus the command
  8030.  
  8031.                EBname.typ;version`
  8032.  
  8033.      is equivalent to the commands
  8034.  
  8035.                ERname.typ;version`EWname.typ;0`
  8036.  
  8037.      The EW command also creates a new version (one  higher  than  the
  8038.      current  highest)  if no version number is given.  If an explicit
  8039.      version number is given, then that number is used, and if another
  8040.      file  of  the same name, type, and version previously existed, it
  8041.      is superseded without  warning.   (See  use  of  the  EP  and  EK
  8042.      commands below.)
  8043.  
  8044.      Standard TECO                                            PAGE 162
  8045.      Appendix F
  8046.  
  8047.  
  8048.      In reading files, version numbers behave the  same  as  in  other
  8049.      RSX-11  utilities:   the  default  is  the highest version.  This
  8050.      leads to a problem in re-opening the input file while a  file  is
  8051.      being  edited  with EB.  Since the output file is already created
  8052.      and in the directory, the input file is  no  longer  the  highest
  8053.      version.   One may deduce the version number of the input file by
  8054.      doing a :G* (typing the file  string  of  the  output  file)  and
  8055.      subtracting one from that version number.
  8056.  
  8057.      In symmetry with the EB command,  the  EK  command  functions  by
  8058.      simply  deleting  the current output file.  Note, however, that a
  8059.      supersede (EW of same name, type, and version) is  not  undone  -
  8060.      the file is already deleted!
  8061.  
  8062.      The EP and EA commands, while simulating two channels  each  with
  8063.      an  open file for each of input and output, in fact only keep one
  8064.      file open for each to conserve buffer  space.   This  means  that
  8065.      they  are only useful for disk files.  Also, it means that if you
  8066.      open a file and then supersede it,  you  should  not  switch  the
  8067.      input  channel  away  from it with an EP or ER` command, since it
  8068.      will not be possible to open the file again.
  8069.  
  8070.  
  8071.      F.4 WILD CARD LOOKUP
  8072.  
  8073.      The EN command will process wild  card  lookups  on  RSX-11.   To
  8074.      preset  the wild card lookup file specification, use the standard
  8075.      RSX-11 format
  8076.  
  8077.                dev:[p,pn]filename.typ;version
  8078.  
  8079.      The device name must reference a file structured disk  device  or
  8080.      magtape.  All other fields of the file specification may be fully
  8081.      wild (*), including either or both halves of the directory.   The
  8082.      version  number  may  be explicit, wild, or default.  As with the
  8083.      other file specification commands, there is no default file type.
  8084.  
  8085.  
  8086.      F.5 EXITING FROM TECO
  8087.  
  8088.      The normal method of exiting from TECO is with  the  EX  command.
  8089.      This  copies  the remaining input file to the output file, closes
  8090.      all files and exits.
  8091.  
  8092.      The <CTRL/C> (or Caret-C) command is the "give up  and  get  out"
  8093.      command.  Executed from main command level, it will cause TECO to
  8094.      exit regardless of the state of the buffer.  If there is an  open
  8095.      output  file,  it  is  deleted.   The <CTRL/C> command is roughly
  8096.      equivalent to EKHKEX.
  8097.  
  8098.      Standard TECO                                            PAGE 163
  8099.      Appendix F
  8100.  
  8101.  
  8102.      F.6 <CTRL/C>
  8103.  
  8104.      The action taken when the user types  <CTRL/C>  depends  on  what
  8105.      TECO is doing.
  8106.  
  8107.      If TECO is executing commands, or is awaiting type-in for the  ^T
  8108.      command, the ?XAB error occurs.
  8109.  
  8110.      If TECO is at command level, typing <CTRL/C> cancels the  command
  8111.      string currently being typed and returns TECO to its prompt.  Two
  8112.      consecutive <CTRL/C> characters  will  cause  an  instant  HKEKEX
  8113.      exit.
  8114.  
  8115.      Sometimes it is desireable for a TECO  macro  to  detect  when  a
  8116.      <CTRL/C>  was  typed.   By  detecting the <CTRL/C>, the macro can
  8117.      exit cleanly  back  to  command  level  (pop  saved  Q-registers,
  8118.      restore  any  flag values, etc.).  To do this, the macro sets Bit
  8119.      15 (Octal 100000,  Decimal  -32768)  of  the  ET  flag.   When  a
  8120.      <CTRL/C>  is  typed, TECO will automatically turn off Bit 15, but
  8121.      will continue execution of the  macro.   The  macro  periodically
  8122.      checks  Bit  15  and  exits  cleanly  if  it  ever goes off.  For
  8123.      example:
  8124.  
  8125.               [0 [1 -32768#ETET < ... ET; > 32767&ETET ]1 ]0
  8126.  
  8127.      Setting the <CTRL/C> intercept bit in the ET flag  must  be  done
  8128.      with  some  care;   if the bit is set inside a command loop which
  8129.      does not check it, it will be impossible for the  user  to  abort
  8130.      the  loop.   The  only remedy for this situation is to abort TECO
  8131.      from another terminal.
  8132.  
  8133.  
  8134.      F.7 EXIT AND GO
  8135.  
  8136.      If TECO is exited via the  EGstring`  command,  TECO  closes  its
  8137.      files  and  exits.   It then causes "string" to be executed as an
  8138.      MCR command using the spawn system directive.  This feature works
  8139.      only on RSX-11M V3.2 and RSX-11M+ V1 or later.
  8140.  
  8141.  
  8142.      F.8 ET FLAG HANDLING
  8143.  
  8144.      TECO will automatically turn off the following  bits  in  the  ET
  8145.      flag  on  every  error:   Bit 0 (image output), Bit 3 (no echo on
  8146.      ^T), Bit 4 (cancel ^O), Bit 5 (no stall on ^T), and  Bit  15  (^C
  8147.      trap).
  8148.  
  8149.      In addition, TECO always turns off Bit 7 (exit  on  error,  etc.)
  8150.      every time is reaches prompt (*) level.
  8151.  
  8152.      Bit  6  (the  detach  flag)  controls  TECO'S  treatment  of  the
  8153.      terminal.   Normally,  TECO  keeps  the terminal attached to gain
  8154.      control of <CTRL/C> interrupts.  Setting bit 6  of  the  ET  flag
  8155.  
  8156.      Standard TECO                                            PAGE 164
  8157.      Appendix F
  8158.  
  8159.  
  8160.      causes  TECO  to  run  with  the terminal detached.  All commands
  8161.      function normally, except that typing <CTRL/C> causes the MCR  to
  8162.      be  activated,  allowing  other  tasks  to  be  run from the same
  8163.      terminal concurrently with TECO.  It is, of  course,  the  user's
  8164.      problem  to  sort  out the confusion that will arise if both TECO
  8165.      and another task request input from  the  terminal  at  the  same
  8166.      time.
  8167.  
  8168.  
  8169.      F.9 FILE RECORD FORMAT
  8170.  
  8171.      Files-11 files are record structured, while TECO'S text buffer is
  8172.      ASCII  stream.   Thus  TECO  must  make  format  conversions when
  8173.      reading and writing files.  The conversion depends on the  record
  8174.      attributes  of  the  file.  While reading a file, the records are
  8175.      packed into the buffer.  If the file is implied carriage  control
  8176.      (the  standard RSX-11 source format) or Fortran carriage control,
  8177.      TECO inserts a carriage return and line feed after each record to
  8178.      make  each  record appear as a line of text in the buffer, unless
  8179.      the record ends with ESCAPE, carriage return, line feed, vertical
  8180.      tab,  or  form feed.  A record ending in form feed is interpreted
  8181.      as an end of page mark;  it stops the read operation and the form
  8182.      feed  is  not  entered in the buffer.  If the file has print file
  8183.      carriage control, TECO interprets the carriage control bytes  and
  8184.      inserts  the  resulting  carriage return and line feed characters
  8185.      about the record.  If the input  file  has  no  carriage  control
  8186.      (also  called  internal  carriage control), TECO simply packs the
  8187.      records together in the text buffer.
  8188.  
  8189.      On output, TECO scans the text buffer for carriage  return,  line
  8190.      feed,   vertical  tab,  and  form  feed  characters.   Each  such
  8191.      character delimits the end of an output record.   If  the  output
  8192.      file  is implied or Fortran carriage control, and the record ends
  8193.      with exactly carriage return / line feed, the carriage return and
  8194.      line  feed are not output with the record;  Otherwise, the record
  8195.      is output in its entirety.  The carriage return and line feed are
  8196.      also  output  with  the  record  if the record ends with ESCAPE /
  8197.      carriage return / line feed.
  8198.  
  8199.      Switches may be applied to the input and output files to  control
  8200.      their carriage control attributes.  The switch /CR forces implied
  8201.      carriage control;  /-CR forces no  (internal)  carriage  control;
  8202.      /FT  forces  Fortran  carriage  control.  When a carriage control
  8203.      switch is applied to an input file, the file is read as if it had
  8204.      that  attribute;   when  the switch is applied to an output file,
  8205.      the file is written with that attribute.  Applying a switch to an
  8206.      EB  file  specification  causes the switch to apply to both input
  8207.      and output files.  When an output file is created,  its  carriage
  8208.      control  attributes  are defaulted to those of the currently open
  8209.      input file as follows:
  8210.  
  8211.      Standard TECO                                            PAGE 165
  8212.      Appendix F
  8213.  
  8214.  
  8215.           Input               Output
  8216.  
  8217.           implied             implied
  8218.           none                implied
  8219.           FORTRAN             FORTRAN
  8220.           print file          implied
  8221.  
  8222.      Files read with the  EI  command  have  their  record  attributes
  8223.      interpreted in the same manner.  This leads to an unexpected side
  8224.      effect with EI files containing  an  entire  command.   The  last
  8225.      record of the file presumably contains as its last characters the
  8226.      two alt modes which initiate execution of the macro.  If the file
  8227.      is  implied  carriage  control, however, there are also the final
  8228.      carriage return / line feed belonging to the last  record,  which
  8229.      remain  in  the  type in buffer while the macro executes.  If the
  8230.      macro attempts to receive input with the  <CTRL/T>  command,  the
  8231.      carriage  return  /  line  feed  will be the first two characters
  8232.      read.  Alternatively, if the macro does no type in, the  carriage
  8233.      return  /  line  feed  will  be  read  by  TECO  as the first two
  8234.      characters of the next command.  Then no asterisk (*) will appear
  8235.      as the prompt for the next command.  The remedy for both cases is
  8236.      for the macro to execute an EI` command early  on.   This  causes
  8237.      the  remainder  of  the indirect file to be discarded and further
  8238.      input to be read from the terminal.
  8239.  
  8240.  
  8241.      F.10 COMMAND LINE PROCESSING
  8242.  
  8243.      The mechanism used to process the command line in RSX-11 TECO  is
  8244.      designed   to   allow   sophisticated  TECO  users  the  greatest
  8245.      flexibility in customizing TECO for their own use.  It  functions
  8246.      as follows:
  8247.  
  8248.      The initialization routine places the original MCR  command  line
  8249.      (if  any)  into  the  filename  buffer.   It copies into the text
  8250.      buffer the text of a TECO macro that will be  used  to  interpret
  8251.      the command line.  Then it starts up TECO with the command
  8252.  
  8253.                HXY HKG* HXZ HK :EITECO``
  8254.  
  8255.      in the  type  in  buffer.   This  loads  the  command  line  into
  8256.      Q-register  Z  and the macro into Q-register Y.  It then executes
  8257.      the file named TECO.TEC located in the user's default  directory,
  8258.      if  it exists.  After the user's TECO.TEC, and any files it might
  8259.      link to with EI, have been executed, TECO  executes  the  command
  8260.      MY``,  thus executing the macro to interpret the command line and
  8261.      open the files requested.
  8262.  
  8263.      The  TECO.TEC  mechanism  should   not   be   used   for   simple
  8264.      initialization;   the  standard  TECO.INI facility should suffice
  8265.      for that.  The alternate TECO.TEC facility is  provided  for  the
  8266.      sophisticated  user who wants his own command processing and thus
  8267.      wishes to usurp control from the normal initialization.
  8268.  
  8269.      Standard TECO                                            PAGE 166
  8270.      Appendix F
  8271.  
  8272.  
  8273.      If an EI`  command  (to  close  the  indirect  command  file)  is
  8274.      executed during the processing of a user's TECO.TEC startup file,
  8275.      the final MY`` which causes processing of the command line is not
  8276.      executed.   This  results  from  the  fact that the MY`` normally
  8277.      appears in TECO's type in  after  all  command  files  have  been
  8278.      processed.   Executing the EI` command causes all "type ahead" to
  8279.      be discarded to allow a TECO command  file  to  prompt  and  read
  8280.      input from the terminal (and not read extraneous type ahead).  It
  8281.      is assumed that a TECO startup file that executes EI`  and  reads
  8282.      input  from  the  terminal will want to manage the rest of TECO's
  8283.      startup.  If it still wants to process the command line, it  must
  8284.      issue the MY itself.
  8285.  
  8286.      Standard TECO                                            PAGE 167
  8287.      Appendix G
  8288.  
  8289.  
  8290.                                 APPENDIX G
  8291.  
  8292.  
  8293.                      VAX/VMS OPERATING CHARACERISTICS
  8294.  
  8295.  
  8296.  
  8297.      TECO   is   implemented   in   VAX/VMS    as    a    half-native,
  8298.      half-compatibility  mode  program.   The  command  processor  and
  8299.      editor proper is the same as TECO-11 and  runs  in  compatibility
  8300.      mode.   Operating  system interface and file service logic run in
  8301.      native mode.
  8302.  
  8303.  
  8304.      G.1 STARTUP
  8305.  
  8306.      VAX/VMS supports all of the standard  TECO  invocation  commands,
  8307.      namely
  8308.  
  8309.                TECO
  8310.                TECO filespec
  8311.                TECO filespec=filespec
  8312.                MAKE filespec
  8313.                MUNG filespec
  8314.                MUNG filespec,text
  8315.  
  8316.      If any of these commands are not recognized by  the  system,  see
  8317.      the installation instructions (section G.13) in this appendix.
  8318.  
  8319.      TECO macros may also be invoked with the command
  8320.  
  8321.                TECO @filespec
  8322.  
  8323.      It is exactly equivalent to
  8324.  
  8325.                MUNG filespec
  8326.  
  8327.  
  8328.      G.2 INITIALIZATION
  8329.  
  8330.      TECO performs  initialization  by  attempting  to  translate  the
  8331.      logical  name  TEC$INIT.   If  this  name  does not translate, no
  8332.      special initialization is done.  If it translates to a string  of
  8333.      the  form  $filespec  (where "$" is a dollar sign), TECO executes
  8334.      the   TECO   commands   in   the   specified   filespec    during
  8335.      initialization.  If TEC$INIT translates to any other string, TECO
  8336.      executes that string as TECO commands during initialization.  The
  8337.      original  command  line  is available in the text buffer when the
  8338.      user initialization commands execute.  Generally, you  would  set
  8339.      user  private  modes and/or flags at this time.  This is also the
  8340.      normal place to detect, strip off, and do  something  appropriate
  8341.      with user private qualifiers.
  8342.  
  8343.      Standard TECO                                            PAGE 168
  8344.      Appendix G
  8345.  
  8346.  
  8347.      TECO's memory is controlled by the logical name  TEC$MEMORY.   If
  8348.      this name translates to a string of the form $filespec, TECO uses
  8349.      the specified file for its  memory.   Otherwise,  TECO  uses  the
  8350.      logical name itself as the memory.
  8351.  
  8352.      If TECO is requested to load  VTEDIT  at  startup  (e.g.,  via  a
  8353.      TECO /VTEDIT  command), it attempts to translate the logical name
  8354.      TEC$VTEDIT.  If the name is defined, the  resulting  filespec  is
  8355.      used  as  the  file  from  which  to  load  the scope editor.  If
  8356.      TEC$VTEDIT is not defined, TECO attempts to translate the logical
  8357.      name  TEC$LIBRARY.  If that logical is defined, it is used as the
  8358.      (device  and)  directory  name  of  where  to  find   VTEDIT.TEC.
  8359.      Elsewise, TECO defaults to SYS$LIBRARY:VTEDIT.TEC.
  8360.  
  8361.      These four logical names (TEC$INIT, TEC$MEMORY,  TEC$VTEDIT,  and
  8362.      TEC$LIBRARY)  are  the  information  holders corresponding to the
  8363.      four standard :EG commands INI, MEM, VTE,  and  LIB  respectively
  8364.      (see section 5.1.3).
  8365.  
  8366.  
  8367.      G.3 FILE SPECIFICATION
  8368.  
  8369.      All file specifiers are subject to  the  VAX/VMS  file  specifier
  8370.      rules;   logical  names  and multi-level directories are properly
  8371.      handled, including transparent network file access.  The filename
  8372.      field  must  be  specified  whenever the device name references a
  8373.      file structured device.  The type field must be explicitly  given
  8374.      if  used.   There is no default type except for EI commands which
  8375.      default the type field to .TEC.
  8376.  
  8377.      Qualifiers may be  applied  to  file  specifications  to  control
  8378.      format and attributes;  see G.11.
  8379.  
  8380.      The qualifier /RW may be applied to any file specification in  an
  8381.      ER,  EW,  and EI command.  If the file specification references a
  8382.      magtape, the tape is rewound before the  file  is  opened.   Note
  8383.      that  for  output files, this has the effect of zeroing the tape.
  8384.      The /RW qualifier is ignored for all other device types.
  8385.  
  8386.      The  presence  of  version  numbers  in  Files-11   causes   file
  8387.      processing  to  behave  slightly  differently  under VAX/VMS than
  8388.      under other operating systems.  For example, no  .BAK  files  are
  8389.      used;   each  execution  of  an  EB command simply produces a new
  8390.      version of the file.  Thus a user may retain any level of  backup
  8391.      he  feels  to  be  comfortable.   It  also  means  that  one must
  8392.      occasionally delete obsolete files to avoid cluttering the  disk.
  8393.      Thus the command
  8394.  
  8395.                EBname.typ;version`
  8396.  
  8397.      is equivalent to the commands
  8398.  
  8399.                ERname.typ;version`EWname.typ;0`
  8400.  
  8401.      Standard TECO                                            PAGE 169
  8402.      Appendix G
  8403.  
  8404.  
  8405.      The EW command also creates a new version (one  higher  than  the
  8406.      current  highest)  if no version number is given.  If an explicit
  8407.      version number is given, then that number is used, and if another
  8408.      file  of  the same name, type, and version previously existed, it
  8409.      is superseded without  warning.   (See  use  of  the  EK  command
  8410.      below.)
  8411.  
  8412.      In reading files, version numbers behave the  same  as  in  other
  8413.      VAX/VMS  utilities:   the  default  is the highest version.  This
  8414.      leads to a problem in re-opening the input file while a  file  is
  8415.      being  edited  with EB.  Since the output file is already created
  8416.      and in the directory, the input file is  no  longer  the  highest
  8417.      version.   One may deduce the version number of the input file by
  8418.      doing a ER`:G*`` which types  the  file  string  of  the  current
  8419.      (primary) input file.
  8420.  
  8421.      In symmetry with the EB command,  the  EK  command  functions  by
  8422.      simply  deleting  the current output file.  Note, however, that a
  8423.      supersede (EW of same name, type, and version) is  not  undone  -
  8424.      the file is already deleted!
  8425.  
  8426.      When  files  are  processed  concurrently  on  the  primary   and
  8427.      secondary  channels,  all files are kept open.  Thus the problems
  8428.      that occur under RSX-11 do not exist under VAX/VMS.
  8429.  
  8430.  
  8431.      G.4 WILD CARD LOOKUP
  8432.  
  8433.      Wild card file name processing supports all of the  wild  carding
  8434.      facilities  of  RMS.   For  VAX/VMS  V2  and  later  systems this
  8435.      includes embedded * and % and multi-level directory wildcarding.
  8436.  
  8437.  
  8438.      G.5 SYMBOL CONSTITUENTS
  8439.  
  8440.      The match control character ^EC and the  conditional  n"C  accept
  8441.      the  VAX/VMS  symbol constituent character set, which consists of
  8442.      upper and lower case alphabetics, numerics, ., $, and _.
  8443.  
  8444.  
  8445.      G.6 EXITING FROM TECO
  8446.  
  8447.      The normal method of exiting from TECO is with  the  EX  command.
  8448.      This  copies  the remaining input file to the output file, closes
  8449.      all files and exits.
  8450.  
  8451.      The <CTRL/C> (or Caret-C) command is the "give up  and  get  out"
  8452.      command.  Executed from main command level, it will cause TECO to
  8453.      exit regardless of the state of the buffer.  If there is an  open
  8454.      output  file,  it  is  deleted.   The <CTRL/C> command is roughly
  8455.      equivalent to EKHKEX.
  8456.  
  8457.      TECO's normal exit status code (as reflected by the  DCL  symbols
  8458.  
  8459.      Standard TECO                                            PAGE 170
  8460.      Appendix G
  8461.  
  8462.  
  8463.      $STATUS  and `SEVERITY) is 1 (success).  An exit caused by an EG`
  8464.      command sets the exit status code to 9 (also success).  An  error
  8465.      exit  caused  by  an error or <CTRL/C> with the 128 bit set in ET
  8466.      sets the exit  status  code  to  hexidecimal  1000002C  which  is
  8467.      SS$_ABORT  with the inhibit message bit set.  All other exits are
  8468.      from fatal internal errors and the exit status code is the  fatal
  8469.      error status code.
  8470.  
  8471.  
  8472.      G.7 <CTRL/C>
  8473.  
  8474.      The action taken when the user types  <CTRL/C>  depends  on  what
  8475.      TECO is doing.
  8476.  
  8477.      If TECO is executing commands, or is awaiting type-in for the  ^T
  8478.      command, the ?XAB error occurs.
  8479.  
  8480.      If TECO is at command level, typing <CTRL/C> cancels the  command
  8481.      string currently being typed and returns TECO to its prompt.  Two
  8482.      consecutive <CTRL/C> characters  will  cause  an  instant  HKEKEX
  8483.      exit.
  8484.  
  8485.      Sometimes it is desireable for a TECO  macro  to  detect  when  a
  8486.      <CTRL/C>  was  typed.   By  detecting the <CTRL/C>, the macro can
  8487.      exit cleanly  back  to  command  level  (pop  saved  Q-registers,
  8488.      restore  any  flag values, etc.).  To do this, the macro sets Bit
  8489.      15 (Octal 100000,  Decimal  -32768)  of  the  ET  flag.   When  a
  8490.      <CTRL/C>  is  typed, TECO will automatically turn off Bit 15, but
  8491.      will continue execution of the  macro.   The  macro  periodically
  8492.      checks  Bit  15  and  exits  cleanly  if  it  ever goes off.  For
  8493.      example:
  8494.  
  8495.               [0 [1 -32768#ETET < ... ET; > 32767&ETET ]1 ]0
  8496.  
  8497.      Setting the <CTRL/C> intercept bit in the ET flag  must  be  done
  8498.      with  some  care;   if the bit is set inside a command loop which
  8499.      does not check it, it will be impossible for the  user  to  abort
  8500.      the  loop.   The  only remedy for this situation is to abort TECO
  8501.      with <CTRL/Y>, resulting in the loss of the edit.
  8502.  
  8503.  
  8504.      G.8 <CTRL/Y>
  8505.  
  8506.      <CTRL/Y> is not handled  at  all  by  TECO  and  will  result  in
  8507.      trapping  to  the  command  interpreter.  Should you accidentally
  8508.      type <CTRL/Y>, immediately type CONTINUE in response to  the  DCL
  8509.      prompt to resume editing.
  8510.  
  8511.  
  8512.      G.9 EXIT AND GO
  8513.  
  8514.      If TECO is exited with  the  EGstring`  command,  the  string  is
  8515.      passed  to the command interpreter as the next command to execute
  8516.  
  8517.      Standard TECO                                            PAGE 171
  8518.      Appendix G
  8519.  
  8520.  
  8521.      after TECO has closed its files and exited.  This  feature  works
  8522.      only on VAX/VMS V2 and later systems.
  8523.  
  8524.  
  8525.      G.10 ET FLAG HANDLING
  8526.  
  8527.      TECO will automatically turn off the following  bits  in  the  ET
  8528.      flag  on  every  error:   Bit 0 (image output), Bit 3 (no echo on
  8529.      ^T), Bit 4 (cancel ^O), Bit 5 (no stall on ^T), and  Bit  15  (^C
  8530.      trap).
  8531.  
  8532.      In addition, TECO always turns off Bit 7 (exit  on  error,  etc.)
  8533.      every time is reaches prompt (*) level.
  8534.  
  8535.      Bit 6 (the detach flag) has no meaning in VAX/VMS.
  8536.  
  8537.  
  8538.      G.11 FILE RECORD FORMAT
  8539.  
  8540.      Files-11 files are record structured, while TECO'S text buffer is
  8541.      ASCII  stream.   Thus  TECO  must  make  format  conversions when
  8542.      reading and writing files.  The conversion depends on the  record
  8543.      attributes  of  the  file.  While reading a file, the records are
  8544.      packed into the buffer.  If the file is implied carriage  control
  8545.      (the standard VAX/VMS source format) or FORTRAN carriage control,
  8546.      TECO inserts a carriage return and line feed after each record to
  8547.      make  each  record appear as a line of text in the buffer, unless
  8548.      the record ends with ESCAPE, carriage return, line feed, vertical
  8549.      tab,   or  form  feed.   A  record  containing  a  form  feed  is
  8550.      interpreted as an end of page mark;  it stops the read  operation
  8551.      and  the  form feed is not entered in the buffer.  The portion of
  8552.      the record after the form feed, if any, is  saved  for  the  next
  8553.      input command.  If the file has print file carriage control, TECO
  8554.      interprets the carriage control bytes and inserts  the  resulting
  8555.      carriage  return  and  line feed characters about the record.  If
  8556.      the input file has no  carriage  control  (also  called  internal
  8557.      carriage  control), TECO simply packs the records together in the
  8558.      text buffer.
  8559.  
  8560.      On output, TECO scans the text buffer for carriage  return,  line
  8561.      feed,   vertical  tab,  and  form  feed  characters.   Each  such
  8562.      character delimits the end of an output record.   If  the  output
  8563.      file  is implied or FORTRAN carriage control, and the record ends
  8564.      with exactly carriage return / line feed, the carriage return and
  8565.      line  feed are not output with the record;  Otherwise, the record
  8566.      is output in its entirety.  The carriage return and line feed are
  8567.      also  output  with  the  record  if the record ends with ESCAPE /
  8568.      carriage return / line feed.
  8569.  
  8570.      Qualifiers  may  be  applied  to  the  input  and   output   file
  8571.      specifications.   When a carriage control qualifier is applied to
  8572.      an input file, the file is read as  if  it  had  that  attribute;
  8573.      when  the  qualifier  is  applied  to an output file, the file is
  8574.  
  8575.      Standard TECO                                            PAGE 172
  8576.      Appendix G
  8577.  
  8578.  
  8579.      written with that attribute.  Applying a qualifier to an EB  file
  8580.      specification  causes  the  qualifier  to apply to both input and
  8581.      output files.
  8582.  
  8583.      The following qualifiers may be used to control input processing:
  8584.  
  8585.           /-CR                Force "none" file record attributes
  8586.           /CR                 Force "Implied" file record attributes
  8587.           /FT                 Force "FORTRAN" file record attributes
  8588.           /FTN                Same as /FT
  8589.           /B2                 BASIC-PLUS-x handling (see Appendix J)
  8590.  
  8591.      The  following  qualifiers  may  be  used   to   control   output
  8592.      processing:
  8593.  
  8594.           /VAR                Create file record format "Var"
  8595.           /STM                Create file record format "Stm"
  8596.           /-CR                Create file record format "None"
  8597.           /CR                 Create file record format "Implied"
  8598.           /FT                 Create file record format "FORTRAN"
  8599.           /FTN                Same as /FT
  8600.           /B2                 BASIC-PLUS-x handling (see Appendix J)
  8601.  
  8602.      The   following   qualifiers   may    be    used    to    control
  8603.      open/create/access options:
  8604.  
  8605.           /RW                 Rewind before open/create
  8606.           /SH                 Enable file sharing
  8607.           /SHR                Same as /SH
  8608.  
  8609.      Below is  a  complete  list  of  valid  TECO  input  file  record
  8610.      format/attribute    combinations    and    the   resulting   file
  8611.      format/attribute combinations for EB commands:
  8612.  
  8613.            Input                     Output
  8614.        Format Attribute          Format Attribute
  8615.  
  8616.         Fix     none              Var     Implied
  8617.         Fix     Implied           Var     Implied
  8618.         Fix     FORTRAN           Var     FORTRAN
  8619.         Var     none              Var     Implied
  8620.         Var     Implied           Var     Implied
  8621.         Var     FORTRAN           Var     FORTRAN
  8622.         VFC     Print             Var     Implied
  8623.         Stm     none              Stm     Implied
  8624.         Stm     Implied           Stm     Implied
  8625.  
  8626.      Files read with the  EI  command  have  their  record  attributes
  8627.      interpreted in the same manner.  This leads to an unexpected side
  8628.      effect with EI files containing  an  entire  command.   The  last
  8629.      record of the file presumably contains as its last characters the
  8630.      two alt modes which initiate execution of the macro.  If the file
  8631.      is  implied  carriage  control, however, there are also the final
  8632.  
  8633.      Standard TECO                                            PAGE 173
  8634.      Appendix G
  8635.  
  8636.  
  8637.      carriage return / line feed belonging to the last  record,  which
  8638.      remain  in  the  type in buffer while the macro executes.  If the
  8639.      macro attempts to receive input with the  <CTRL/T>  command,  the
  8640.      carriage  return  /  line  feed  will be the first two characters
  8641.      read.  Alternatively, if the macro does no type in, the  carriage
  8642.      return  /  line  feed  will  be  read  by  TECO  as the first two
  8643.      characters of the next command.  Then no asterisk (*) will appear
  8644.      as the prompt for the next command.  The remedy for both cases is
  8645.      for the macro to execute an EI` command early  on.   This  causes
  8646.      the  remainder  of  the indirect file to be discarded and further
  8647.      input to be read from the terminal as soon as the double alt mode
  8648.      is encountered.
  8649.  
  8650.  
  8651.      G.12 COMMAND LINE PROCESSING
  8652.  
  8653.      The mechanism used to process the command line in VAX/VMS TECO is
  8654.      designed   to   allow   sophisticated  TECO  users  the  greatest
  8655.      flexibility in customizing TECO for their own use.  It  functions
  8656.      as follows:
  8657.  
  8658.      The initialization routine places  a  built-in  command  decoding
  8659.      TECO  macro  into  Q-register  Y  and  the  original command line
  8660.      (including the keyword TECO, MAKE, or MUNG) into Q-register Z.
  8661.  
  8662.      It then looks for a user private command decoding TECO  macro  by
  8663.      attempting
  8664.  
  8665.           1.  an EITECO`` if the logical name "TECO" exists, elsewise
  8666.  
  8667.           2.  an EISYS$LOGIN:TECO`` if the  logical  name  "SYS$LOGIN"
  8668.               exists, elsewise
  8669.  
  8670.           3.  an EITECO``
  8671.  
  8672.      If the EI succeeds, the found file is executed.  The file may, or
  8673.      course,  do  anything  it  pleases.   Generally,  you would use a
  8674.      private command decoder to automate some sort of system  specific
  8675.      editing  package.   For  example, to implement an editing package
  8676.      called FOOBAR, you would define the logical TECO with
  8677.                $ DEFINE/SYSTEM TECO dev:[dir]FOOBAR
  8678.      define a DCL foreign command symbol with
  8679.                $ FOOBAR :== $SYS$SYSTEM:TECO FOOBAR
  8680.      and place the TECO macro the  implements  the  FOOBAR  editor  in
  8681.      dev:[dir]FOOBAR.TEC.  Now, whenever a TECO, MAKE, MUNG, or FOOBAR
  8682.      command is issued, the your macro will gain control.   It  should
  8683.      fetch Q-register Z (the original command line), check the command
  8684.      type, if it's FOOBAR  then  go  do  its  thing,  else  it  should
  8685.      terminate and execute TECO's built-in command decoder.
  8686.  
  8687.                GZ               ! Put command into text buffer !
  8688.                J ::@S/FOOBAR/"U ! Is the command for us? !
  8689.                  @EI//          ! Not for us, turn us off !
  8690.  
  8691.      Standard TECO                                            PAGE 174
  8692.      Appendix G
  8693.  
  8694.  
  8695.                  HK             ! Clear out text buffer !
  8696.                  MY             ! Let the real TECO takeover !
  8697.                '                ! It's for us, just flow on... !
  8698.                $$               ! Double ESCAPE; 1st command's end !
  8699.                ...              ! Do your own thing here... !
  8700.  
  8701.      This mechanism should not be used for simple initialization;  the
  8702.      standard   TEC$INIT  facility  should  suffice  for  that.   This
  8703.      facility is provided for the sophisticated user who wants his own
  8704.      command processing and thus wishes to usurp control.
  8705.  
  8706.  
  8707.      G.13 HELP
  8708.  
  8709.      On VAX/VMS, TECO can provide HELP in any of three ways.
  8710.  
  8711.      You can issue a HELP command at  TECO's  asterisk  prompt.   This
  8712.      HELP  command  obeys  the  standard  VAX/VMS  HELP command syntax
  8713.      rules.  The HELP command may be terminated by  either  RETURN  or
  8714.      ``.
  8715.  
  8716.      You can type the / command  immediately  after  an  error.   (See
  8717.      section  4.2.) TECO will respond with a one-paragraph description
  8718.      of the error.
  8719.  
  8720.      You can set EH to 3.  (See section 5.16.) This will cause TECO to
  8721.      automatically  respond  with  a  one-paragraph description of any
  8722.      error which occurs.
  8723.  
  8724.  
  8725.      G.14 INSTALLING TECO
  8726.  
  8727.      TECO is distributed with  VAX/VMS;   the  files  are  already  in
  8728.      place.   If  TECO  will receive heavy use, it should be installed
  8729.      /OPEN and /HEADER_RESIDENT.
  8730.  
  8731.      The following commands, if used in a LOGIN.COM file, would define
  8732.      the three normal TECO invocation commands:
  8733.  
  8734.                $ TE*CO :== $SYS$SYSTEM:TECO TECO
  8735.                $ MAK*E :== $SYS$SYSTEM:TECO MAKE
  8736.                $ MU*NG :== $SYS$SYSTEM:TECO MUNG
  8737.  
  8738.      The asterisk allows for  abbreviation  of  these  commands.   For
  8739.      example, the TE*CO definition permits TE, TEC, or TECO.
  8740.  
  8741.      One may include command qualifiers in  the  command  definitions.
  8742.      For  example, one can define a command to invoke TECO with VTEDIT
  8743.      as follows:
  8744.  
  8745.                $ VTECO :== $SYS$SYSTEM:TECO TECO /VTEDIT
  8746.  
  8747.      Standard TECO                                            PAGE 175
  8748.      Appendix H
  8749.  
  8750.  
  8751.                                 APPENDIX H
  8752.  
  8753.  
  8754.                       OS/8 OPERATING CHARACTERISTICS
  8755.  
  8756.  
  8757.      H.1 STARTUP
  8758.  
  8759.      TECO is started with the
  8760.  
  8761.                .R TECO
  8762.  
  8763.      command.  TECO is now immediately ready to accept commands.   The
  8764.      text buffer and Q-register areas are empty.
  8765.  
  8766.      The TECO command
  8767.  
  8768.                .TECO filespec
  8769.  
  8770.      is used to edit an already existing file.  It is equivalent to
  8771.  
  8772.                .R TECO
  8773.                *EBfilespec`Y``
  8774.  
  8775.      OS/8 "remembers" the filespec as the name of the last  file  that
  8776.      has been edited.
  8777.  
  8778.      The MAKE command
  8779.  
  8780.                .MAKE filespec
  8781.  
  8782.      is used to create a new file.  It is equivalent to
  8783.  
  8784.                .R TECO
  8785.                *EWfilespec``
  8786.  
  8787.      OS/8 "remembers" the filespec as the name of the last  file  that
  8788.      was edited.
  8789.  
  8790.      The command
  8791.  
  8792.                .TECO filespec1=filespec2
  8793.  
  8794.      is used to edit filespec2 into filespec1.  That is, filespec2  is
  8795.      opened  as the input file, and filespec1 is created as the output
  8796.      file.  It is equivalent to
  8797.  
  8798.                .R TECO
  8799.                *ERfilespec2`EWfilespec1`Y``
  8800.  
  8801.      OS/8 "remembers" the filespec1 as the name of the last file  that
  8802.      was edited.
  8803.  
  8804.      Standard TECO                                            PAGE 176
  8805.      Appendix H
  8806.  
  8807.  
  8808.      The command
  8809.  
  8810.                .TECO
  8811.  
  8812.      with no arguments, causes CCL to execute the command
  8813.  
  8814.                .TECO filespec
  8815.  
  8816.      where filespec was the file that was previously remembered as the
  8817.      last  file  to be edited.  The system purposely does not remember
  8818.      filenames from one day to the next, but it  will  remember  names
  8819.      across bootstraps.
  8820.  
  8821.      The command
  8822.  
  8823.                .MUNG filespec
  8824.  
  8825.      executes the specified TECO program.  The  default  extension  is
  8826.      .TEC .  This is equivalent to the sequence:
  8827.  
  8828.                .R TECO
  8829.                *ERfilespec`YHXYHKMY``
  8830.  
  8831.      Another format of this command is
  8832.  
  8833.                .MUNG filespec,argument
  8834.  
  8835.      which is used to pass an argument to the TECO program to  control
  8836.      its action.  This is equivalent to the sequence:
  8837.  
  8838.                .R TECO
  8839.                *ERfilespec`YHXYHKIargument`MY``
  8840.  
  8841.  
  8842.      The argument may be the name of a file that the TECO  program  is
  8843.      to  mung,  or  it may be a command to the program to specify what
  8844.      action to take, or whatever.  It is up to  the  TECO  program  to
  8845.      decode  this argument (which is left in the text buffer) and take
  8846.      appropriate action.  A TECO program executed via the MUNG command
  8847.      must  never  destroy  the  text  storage area of Q-register Y and
  8848.      expect to ever see the light of day again.
  8849.  
  8850.      Note the input file remains open and can provide  more  input  to
  8851.      the macro.
  8852.  
  8853.  
  8854.      H.2 STARTUP CONDITIONS
  8855.  
  8856.      The initial value of the EU flag is 0 if the CCL command SET  TTY
  8857.      NO SCOPE had been previously issued, and is -1 if the CCL command
  8858.      SET TTY SCOPE had previously been issued.
  8859.  
  8860.      The initial value of the ET flag is as follows:
  8861.  
  8862.      Standard TECO                                            PAGE 177
  8863.      Appendix H
  8864.  
  8865.  
  8866.           Bit value      Initial value
  8867.  
  8868.                1         0
  8869.                2         0 (1 if terminal is a scope)
  8870.                4         0
  8871.                8         0
  8872.                16        0
  8873.                32        0
  8874.                64        0
  8875.                128       1 (TECO's prompt sets this to 0)
  8876.                256       0
  8877.                512       0 (1 if VT support is present)
  8878.                1024      0 (1 if VR12 support is present)
  8879.                2048      0
  8880.  
  8881.      The initial value of the ED flag is 1.
  8882.  
  8883.  
  8884.      H.3 FILE SPECIFICATION
  8885.  
  8886.      The  file  access  commands  ER,  EB,  and  EW  accept   a   file
  8887.      specification in the standard OS/8 format:
  8888.  
  8889.                dev:filename.type
  8890.  
  8891.      in which dev:  is a physical  device  name  or  a  user  assigned
  8892.      logical  name;   if  dev:  is not specified, the default DSK:  is
  8893.      assumed.  The filename field must be specified  in  the  commands
  8894.      ER, EB, and EW and be a legal OS/8 filename.  The type field is a
  8895.      file extension and must be explicitly given if used (there is  no
  8896.      default).   Any characters after the second will be ignored, thus
  8897.      the filespecs FOO.TEC and FOO.TE are equivalent.  The EB  and  EW
  8898.      commands  do  not accept the extended notation for an output file
  8899.      size
  8900.  
  8901.                             dev:filename.type[n]
  8902.  
  8903.      specifying an output size allocation.
  8904.  
  8905.  
  8906.      H.5 BACKUP FILES
  8907.  
  8908.      The EB command maintains one level of file backup on  OS/8.   The
  8909.      pre-edited input file name is changed to
  8910.  
  8911.                filename.BK
  8912.  
  8913.      before the new output file is  closed  with  the  original  name.
  8914.      Only normal file closing commands (EC, EF, EG, and EX) cause this
  8915.      renaming to happen.  If TECO is aborted or  the  output  file  is
  8916.      purged  by  the EK command, the input filename remains unchanged.
  8917.      Note only one .BK file for a given name  is  kept;   earlier  .BK
  8918.      backup files are deleted each time a new backup file is created.
  8919.  
  8920.      Standard TECO                                            PAGE 178
  8921.      Appendix H
  8922.  
  8923.  
  8924.      A good policy to follow when editing is to close the edited  file
  8925.      frequently  enough so that an unexpected incident would not cause
  8926.      a substantial loss of work.  Files should be backed up regularly.
  8927.      TECO  has the power to let an unsuspecting user alter a good file
  8928.      into a completely useless state.  The SRCCOM program can be  used
  8929.      to verify an editing session.
  8930.  
  8931.  
  8932.      H.6 EXIT AND GO
  8933.  
  8934.      If TECO is exited via the EGstring` command, the string is passed
  8935.      to the system as the next command to execute.  This string may be
  8936.      any valid command or an indirect command file specification.  The
  8937.      command  may  be  either a KBM or a CCL command.  This command is
  8938.      especially useful while running under BATCH.
  8939.  
  8940.      If TECO is exited via the EG` command, then OS/8 will  re-execute
  8941.      the  last  explicit  compile-class command that was executed that
  8942.      day.  The  commands  that  are  considered  to  be  compile-class
  8943.      commands are:
  8944.  
  8945.      COMPILE file
  8946.      LOAD file
  8947.      EXECUTE file
  8948.      LINK file
  8949.      MACRO file.
  8950.  
  8951.      This feature, combined with OS/8's  other  remembering  features,
  8952.      minimizes the number of keystrokes necessary to do normal program
  8953.      development.  The programmer does not have to constantly type  in
  8954.      the  name  of  the  file he is working with.  A typical debugging
  8955.      session would look like this:
  8956.  
  8957.                     .MAKE FOO.MAC
  8958.                     *!type in assembly language file to be executed!
  8959.                     *EX``
  8960.                     .EXECUTE FOO
  8961.                     (get error messages)
  8962.                     .TECO
  8963.                     *!fix bugs!
  8964.                     *EG``      !re-compile and execute program!
  8965.                     (watch program work or repeat process)
  8966.  
  8967.  
  8968.      H.7 <CTRL/C>
  8969.  
  8970.      The action taken when the user types  <CTRL/C>  depends  on  what
  8971.      TECO  is doing.  At command level <CTRL/C> is an immediate action
  8972.      command.  If typed as the  very  first  character  in  a  command
  8973.      string  (not  necessarily the first keystroke) it aborts TECO and
  8974.      returns to the keyboard monitor.  If this was done  accidentally,
  8975.      TECO  may  be restarted (at your own risk) by using ODT to branch
  8976.      to location 207 in your program's image.  If <CTRL/C> is typed in
  8977.  
  8978.      Standard TECO                                            PAGE 179
  8979.      Appendix H
  8980.  
  8981.  
  8982.      the  middle  of  entering  a  command string, then the ?XAB error
  8983.      message is given and TECO reprompts with its asterisk.  Note that
  8984.      if  TECO  executes <CTRL/C> as a command from command level, TECO
  8985.      is aborted.  If TECO executes a <CTRL/C> command  from  within  a
  8986.      macro,  TECO  is also aborted.  If a <CTRL/C> is typed while TECO
  8987.      is running, or while TECO is typing on the terminal, or while  an
  8988.      error  message  is printing, then the ?XAB error message is given
  8989.      and TECO reprompts with its asterisk.  TECO will abort similarly,
  8990.      if <CTRL/C> is typed while TECO is waiting for input because of a
  8991.      ^T command.  Note that if TECO is performing I/O using non-system
  8992.      handlers,  the  non-system handler may intercept the <CTRL/C> and
  8993.      abort back to the keyboard monitor.  In  such  a  case,  you  may
  8994.      attempt  to  re-enter  TECO.  However, part of your file has been
  8995.      lost;  good luck in attempting to issue an EF command.   Manually
  8996.      resetting the value of Z might recover your data.
  8997.  
  8998.      If TECO is executing commands or doing I/O, a <CTRL/C> will  stop
  8999.      the operation and generate the ?XAB error message.
  9000.  
  9001.      Sometimes it is desireable for a TECO  macro  to  detect  when  a
  9002.      <CTRL/C>  was  typed.   By  detecting the <CTRL/C>, the macro can
  9003.      exit cleanly back to command  level  (restore  any  flag  values,
  9004.      etc.).   To  do  this,  the macro sets Bit 0 (Octal 4000, Decimal
  9005.      2048) of the ET flag.   When  a  <CTRL/C>  is  typed,  TECO  will
  9006.      automatically  turn off Bit 0, but will continue execution of the
  9007.      macro.  The macro periodically checks Bit 0 and exits cleanly  if
  9008.      it  ever  goes  off.  If the <CTRL/C> trap bit is on, then the ^T
  9009.      can read a <CTRL/C> typed at the terminal.  It has an ASCII value
  9010.      of 3.
  9011.  
  9012.  
  9013.      H.8 FILE RECOVERY
  9014.  
  9015.      TECO can be a useful tool in recovering ASCII  files  lost  on  a
  9016.      block   replaceable   device.   TECO  allows  non-file-structured
  9017.      devices to be opened in a non-file structured mode.   This  gives
  9018.      the  user  the  capability  to  open a disk and access ASCII data
  9019.      anywhere on it, independent of file boundaries.  To do this,  you
  9020.      must issue a command of the form
  9021.  
  9022.                .SET dev:  NOFILES
  9023.  
  9024.      to  the  monitor  to  make   it   think   that   your   disk   is
  9025.      non-file-structured.  The command
  9026.  
  9027.                ERdev:`
  9028.  
  9029.      is used to open the  device  at  which  point  _  (underscore  or
  9030.      backarrow) searches may be used to locate specific ASCII data and
  9031.      transfer it to new output files.  Note that  files  tend  to  get
  9032.      reproduced,  in whole or part, many places on a block replaceable
  9033.      device;  be sure to verify that any given text is indeed complete
  9034.      and the correct version.
  9035.  
  9036.      Standard TECO                                            PAGE 180
  9037.      Appendix H
  9038.  
  9039.  
  9040.      If the disk's directory has not been clobbered  (or  if  you  are
  9041.      willing  to  create  a new one), then it is not necessary to turn
  9042.      the disk into a non-file-structured device.   Merely  open  up  a
  9043.      file  early  on  the disk for input and read through end-of-files
  9044.      until you locate the lost file.  To  read  through  end-of-files,
  9045.      you  must  use  the  /S  switch on an ER, EB, or EW command.  For
  9046.      example, the command
  9047.  
  9048.                                ERFOO.MAC/S`
  9049.  
  9050.      will open the file FOO.MA for input and put TECO into "SUPERTECO"
  9051.      mode.   In  this  mode, TECO will not treat a <CTRL/Z> found in a
  9052.      file as an end-of-file  character.   Instead,  <CTRL/Z>  will  be
  9053.      treated like any other character.  It is not a line terminator or
  9054.      a page terminator.  This mode continues until an ER,  EW,  or  EB
  9055.      command is issued without a /S switch.
  9056.  
  9057.  
  9058.      H.9 VR12 GRAPHICS SUPPORT
  9059.  
  9060.      If TECO is run on a PDP-12, TECO will automatically start  up  in
  9061.      display  mode,  adjusting  to both the size of the display screen
  9062.      and to the presence or absence of the scroller.
  9063.  
  9064.      On  a  PDP-12,  TECO  only  permits  one-page  input  and  output
  9065.      handlers.
  9066.  
  9067.      See Section 5.17 for a description of the available  commands  to
  9068.      interact with the display.
  9069.  
  9070.      Various aspects of the display screen become immediately  obvious
  9071.      upon  seeing  them;  the text pointer, its position and shape and
  9072.      its  position  between  lines;   wrap  around  of  more  than  72
  9073.      characters  per  line, and so on.  Experiment with a scratch file
  9074.      for more familiarity.
  9075.  
  9076.  
  9077.      H.10 EXCEPTIONS
  9078.  
  9079.      TECO-8  does  not  support  the  following  commands  which   are
  9080.      described in this manual:
  9081.  
  9082.           1.  Secondary streams (EP, EA, ER`, EW`)
  9083.  
  9084.           2.  Auxiliary command streams (EI)
  9085.  
  9086.           3.  Wildcards (EN)
  9087.  
  9088.           4.  Zeroing of directories (EZ)
  9089.  
  9090.           5.  Magtape commands (EM)
  9091.  
  9092.           6.  View command (nV)
  9093.  
  9094.      Standard TECO                                            PAGE 181
  9095.      Appendix H
  9096.  
  9097.  
  9098.           7.  Bounded searches
  9099.  
  9100.           8.  Anchored searches
  9101.  
  9102.           9.  Search verification (ES)
  9103.  
  9104.           10. Command verification (EV)
  9105.  
  9106.           11. Backward searches
  9107.  
  9108.           12. Extended string build or match constructs (^Ex)
  9109.  
  9110.      The following incompatibilities exist between TECO-8 and Standard
  9111.      TECO:
  9112.  
  9113.           1.  In octal mode, the digits 8 and 9  are  not  treated  as
  9114.               errors when occurring in a numeric string.
  9115.  
  9116.           2.  The *q immediate  action  command  is  not  implemented.
  9117.               Instead,  the  immediate  action  command * has the same
  9118.               effect as *Z  of  the  standard.   (The  immediate  mode
  9119.               command ^S is still accepted for compatibility with OS/8
  9120.               TECO V5.)
  9121.  
  9122.  
  9123.  
  9124.      H.11 CHAINING TO TECO
  9125.  
  9126.      A user program may chain to TECO  passing  it  a  command  to  be
  9127.      executed.  There are two formats that such a command may take.
  9128.  
  9129.      Format 1 (the TECO command  format)  passes  TECO  a  valid  TECO
  9130.      command  to be executed.  This TECO command is placed in a buffer
  9131.      starting at location 17600, one 7-bit ASCII character  per  word.
  9132.      A  negative word represents a pointer to a continuation buffer in
  9133.      field 1.  There may be any number of  continuation  buffers,  but
  9134.      they  must  all begin above location 4000 in field 1.  Since TECO
  9135.      clobbers most of field 1, these buffers must in fact start  above
  9136.      location  7400.   TECO will never load into page 7400 of field 1.
  9137.      The buffer ends with a fullword 0.
  9138.  
  9139.      Format 2 (the CCL command format) passes TECO a CCL command to be
  9140.      parsed  and  executed.   Such  a  command usually begins with the
  9141.      words TECO, MAKE, or MUNG, but is not  limited  to  these  words.
  9142.      Such  a  CCL  command  is placed in a buffer starting at location
  9143.      17601, one 7-bit ASCII character per word.  Location  17600  must
  9144.      be  a  fullword  0  to specify that this format is being used.  A
  9145.      negative  word  in  the  buffer  represents  a   pointer   to   a
  9146.      continuation  buffer  in  field 1 as described above.  The buffer
  9147.      ends with a fullword 0.  If this format is used, the  passed  CCL
  9148.      command  will  be  parsed  and  executed by TECO.TEC as described
  9149.      below.  A user may write his own TECO.TEC, thus implementing  his
  9150.      own  CCL  commands.  There is no limit to the possiblities, other
  9151.  
  9152.      Standard TECO                                            PAGE 182
  9153.      Appendix H
  9154.  
  9155.  
  9156.      than the user's imagination.
  9157.  
  9158.  
  9159.      H.12 USER INITIALIZATION
  9160.  
  9161.      If a user has a file called TECO.INI  on  SYS:,  then  when  TECO
  9162.      starts  up  (via  a  CCL command, it will execute the contents of
  9163.      this file (as a TECO macro).  This file must contain a valid TECO
  9164.      program  (which  will execute out of Q-register W).  God help you
  9165.      if you have any errors in this program.  This start-up file  must
  9166.      not modify itself (Q-register W) and must not modify the contents
  9167.      of Q-register V.   It  should  not  indiscriminately  modify  the
  9168.      contents  of  Q-register  Z or the text buffer.  TECO.INI will be
  9169.      executed before TECO opens any  files.   That  is,  if  TECO  was
  9170.      invoked  via a MAKE command, TECO.INI will be executed before the
  9171.      EW command (for the MAKE) is executed.  At this point,  the  text
  9172.      buffer  will  contain a copy of the CCL command that invoked TECO
  9173.      (assuming your monitor has TECO.TEC support).  However, TECO  has
  9174.      not  as yet parsed this line.  The user may examine this line for
  9175.      himself, and modify it, but you had  better  know  what  you  are
  9176.      doing  (and  do  it right!).  TECO.TEC will parse the contents of
  9177.      the text buffer at the conclusion of execution of TECO.INI.
  9178.  
  9179.      If your monitor does not have TECO.TEC  support,  or  if  a  user
  9180.      program  chained to TECO passing it a TECO command (rather than a
  9181.      CCL command), then the initial TECO command will be in Q-register
  9182.      Z  when  TECO.INI gets control.  That command has not as yet been
  9183.      executed.  The initialization file may examine  the  contents  of
  9184.      Q-register  Z to determine what TECO command will be executed and
  9185.      proceed  accordingly.   It  may  also  modify  the  contents   of
  9186.      Q-register Z (but you better know what you are doing).
  9187.  
  9188.      In this case, TECO.INI is started up via the sequence
  9189.  
  9190.                     @:ER/SYS:TECO.INI/"SYHXWHK
  9191.                     @^UZ^@teco command^@
  9192.                     MW+0ES.,.XWMZES"N0ESMX'``
  9193.  
  9194.      which loads TECO.INI into Q-register W, loads the chain  argument
  9195.      consisting  of an appropriate teco command into Q-register Z, and
  9196.      temporarily stores the value returned by TECO.INI in  the  search
  9197.      verification  flag  (this  feature  may  change  in  a subsequent
  9198.      release).   Q-register  W  and  ES   are   cleared   before   the
  9199.      post-processing  command  in Q-register X is executed.  Note that
  9200.      the chain argument may not contain any embedded nulls.
  9201.  
  9202.  
  9203.      H.13 RETURNED VALUES FROM TECO.INI
  9204.  
  9205.      TECO.INI may also return a  value.   If  your  monitor  does  not
  9206.      support  TECO.TEC, then only two values are permitted.  Returning
  9207.      a 0 (or not returning anything) is the normal sequence of events.
  9208.      Returning  a  1  means  that  TECO should execute the contents of
  9209.  
  9210.      Standard TECO                                            PAGE 183
  9211.      Appendix H
  9212.  
  9213.  
  9214.      Q-register X (via an MX command) after it  executes  the  initial
  9215.      TECO command (in Q-register Z).  TECO.INI may set up Q-register X
  9216.      with the appropriate post-processing commands.  A typical use  of
  9217.      this  feature would be to have TECO.INI load up Q-register I with
  9218.      an editing macro and then put an "MI" command in Q-register X for
  9219.      subsequent   execution.   If  your  monitor  does  have  TECO.TEC
  9220.      support, then TECO.TEC can support  additional  returned  values.
  9221.      It  is recommended that TECO.TEC support the returned values of 0
  9222.      and 1 as above, but in addition, it may support additional values
  9223.      determined by the user.
  9224.  
  9225.      Note that TECO.INI is not invoked if TECO is started with  a  RUN
  9226.      or R command.
  9227.  
  9228.  
  9229.      H.14 TECO.TEC SUPPORT
  9230.  
  9231.      If the version of CCL you  are  using  to  invoke  TECO  supports
  9232.      TECO.TEC,  then  it will chain to TECO with a 0 at location 17600
  9233.      and will pass TECO the invokig CCL command (beginning at location
  9234.      17601).   If  TECO  is invoked in this manner, it will parse this
  9235.      CCL command by executing  the  TECO  command  line  parser  macro
  9236.      stored  in  SYS:TECO.TEC.  This macro can be modified by the user
  9237.      to parse switches or do any special processing that  is  desired.
  9238.      TECO.TEC is started up via the command
  9239.  
  9240.        @I^@ccl command^@:ER/SYS:TECO.TEC/"F^ACan't find SYS:TECO.TEC
  9241.                          ^A^C^CA.,ZXV.,ZKMV.,.XV``
  9242.  
  9243.      which puts your CCL command in the text  buffer  and  then  loads
  9244.      (the first page of) TECO.TEC into Q-register V.  TECO.TEC is then
  9245.      executed with the MV command and then Q-register  V  is  cleared.
  9246.      It is the responsibility of TECO.TEC to parse the command line in
  9247.      the text buffer and do the appropriate processing  and  clean-up.
  9248.      It  is  also  the  responsibility of TECO.TEC to execute a user's
  9249.      start-up file (TECO.INI) if one is present.  Note  that  TECO.TEC
  9250.      is  not  invoked if TECO is started via a RUN or R command.  Also
  9251.      note, that the CCL command may not contain any embedded nulls.
  9252.  
  9253.  
  9254.      H.15 OVERLAYS
  9255.  
  9256.      The key to writing  fast  TECO  programs  lies  in  understanding
  9257.      TECO-8's overlay structure.  If TECO-8 is run in 16K or more (20K
  9258.      or more if VT support is present),  then  the  overlays  will  be
  9259.      memory-resident rather than disk-resident.  Although this is much
  9260.      faster than swapping from the disk, swapping  from  memory  still
  9261.      involves  some  overhead,  so  it would be wise to structure your
  9262.      TECO program to minimize the number of swaps necessary.
  9263.  
  9264.      The overlay structure is designed so that the minimal  number  of
  9265.      swaps  will  be  required  unless obscure TECO features are used.
  9266.      There are five overlays to TECO:
  9267.  
  9268.      Standard TECO                                            PAGE 184
  9269.      Appendix H
  9270.  
  9271.  
  9272.           1.  The I/O-overlay.  This overlay handles file opening  and
  9273.               is initially resident.  Thus no swapping is necessary to
  9274.               do an initial ER, EW, or EB.
  9275.  
  9276.           2.  The  Q-overlay.   This  overlay  contains  most  of  the
  9277.               frequently   used  conditional  commands  and  branching
  9278.               commands.  It is intended that this overlay swap in once
  9279.               and remain in memory until TECO is exited.
  9280.  
  9281.           3.  The X-overlay.  This is the  exit  overlay  and  handles
  9282.               commands  needed  only when TECO is exiting, such as EX,
  9283.               EF, EC, and EG.  It is intended that this  overlay  will
  9284.               swap in only once when you are ready to leave TECO.
  9285.  
  9286.           4.  The F-overlay.  This overlay contains the flag  commands
  9287.               and  other  little-used  commands.   It is intended that
  9288.               this overlay be not used at all, or if it  is  used,  it
  9289.               will  be used so infrequently that it will not slow down
  9290.               system performance.
  9291.  
  9292.           5.  The E-overlay.   This  is  the  error  overlay.   It  is
  9293.               swapped  in  only  when an error occurs.  It is intended
  9294.               that this overlay never be swapped in.
  9295.  
  9296.  
  9297.      To write efficient TECO code, the user must  know  exactly  which
  9298.      commands  are  handled  by  which  overlay.   This information is
  9299.      summarized below.
  9300.  
  9301.      Overlay        Commands
  9302.  
  9303.      I-overlay      ERfile`, EWfile`, EBfile`, :ERfile`, :EBfile`
  9304.  
  9305.      Q-overlay      Otag`, n"Xthen|else', n;, search;, n<...>, <...>
  9306.  
  9307.      X-overlay      EC, EG`, EGcmd`, EF, EK, EX,
  9308.                     *q, ?, nEJ, n^_, V, ^B, ^E, ^F, ^L, ^N, ^Uqtext`
  9309.  
  9310.      F-overlay      ED, EH, EO, ES, ET, EU, ^D, ^O,
  9311.                     \, n\, n=, n==, n:=, n:==, |
  9312.  
  9313.      Several things are immediately obvious.  The command  0TT  should
  9314.      always  be  preferred  to  the V command.  ELSE clauses should be
  9315.      avoided.  (In future releases, we will try to move the processing
  9316.      of  the | command into overlay Q.) The commands \ and = should be
  9317.      used as infrequently as possible from within long-running macros.
  9318.      Xq  is  preferred  to  ^Uq  to  load  up  a  Q-register.  -n-1 is
  9319.      preferred to n^_ to  take  a  one's  complement.   Radix  changes
  9320.      should  be avoided.  Flags, such as ET and ED, should be set once
  9321.      at the beginning of a macro, and then not fiddled with if at  all
  9322.      possible.
  9323.  
  9324.      Standard TECO                                            PAGE 185
  9325.      Appendix H
  9326.  
  9327.  
  9328.      H.16 INSTALLATION INSTRUCTIONS
  9329.  
  9330.      The source of TECO consists of the following modules:
  9331.  
  9332.      TECO.MAC       Main module
  9333.      TECINI.MAC     Initialization module
  9334.      TECTBL.MAC     Tables
  9335.      TECDEF.MAC     Global definitions
  9336.      TECO12.MAC     VR12 support
  9337.      TECOVT.MAC     VT support
  9338.      TECOVI.MAC     I/O-overlay
  9339.      TECOVQ.MAC     Q-overlay
  9340.      TECOVX.MAC     X-overlay
  9341.      TECOVF.MAC     F-overlay
  9342.      TECERR.MAC     E-overlay and error processor
  9343.      TECSRH.MAC     Search processor
  9344.      TECNUM.MAC     Arithmetic processor
  9345.  
  9346.      Each of these modules should be assembled  (using  MACREL  V2  or
  9347.      later).  This can be accomplished via the command
  9348.  
  9349.                               .MAC TEC???.MAC
  9350.  
  9351.      if your monitor supports wildcards in compile-class commands.
  9352.  
  9353.      The resulting relocatable modules are then linked together (using
  9354.      LINK  V2  or later) to produce the executable TECO.SV image which
  9355.      should be put on SYS:  (but it may reside  on  any  device).   If
  9356.      your  monitor  supports TECO.TEC, then TECO.TEC must be placed on
  9357.      SYS:.
  9358.  
  9359.  
  9360.      H.17 ARITHMETIC PRECISION
  9361.  
  9362.      TECO-8 performs 13-bit arithmetic except that multiplication  and
  9363.      division  by  negative  numbers gives unpredictable results.  All
  9364.      numbers stored in Q-registers are 13 bits long.   Numbers  stored
  9365.      in  flags  (such  as  ET,  EU, etc.) are only 12-bits long.  When
  9366.      storing a number into a flag, the high order (sign bit) is  lost.
  9367.      When  using  the value of a flag in an arithmetic expression, the
  9368.      12-bit value is sign extended first.
  9369.  
  9370.  
  9371.      H.18 ALTERNATE STARTING ADDRESS
  9372.  
  9373.      The normal starting address of TECO is location 00200.   In  this
  9374.      (normal)  mode, TECO will simulate tabs by spaces on type out and
  9375.      will simulate vertical tabs and form feeds  by  line  feeds.   If
  9376.      your  terminal  has  hardware  tabs  and vertical tabs (such as a
  9377.      KSR-35), then TECO can take  advantage  of  these  features.   To
  9378.      enable this ability, you should change TECO's starting address to
  9379.      be 05200.  This can be done by the monitor commands:
  9380.  
  9381.      Standard TECO                                            PAGE 186
  9382.      Appendix H
  9383.  
  9384.  
  9385.                .GET SYS:TECO
  9386.                .SAVE SYS:TECO;5200
  9387.  
  9388.      H.19 VT05 SUPPORT
  9389.  
  9390.      TECO will  automatically  handle  command  string  scope  editing
  9391.      correctly on a VT05.  The VT support (obtained via use of the -1W
  9392.      command) will handle VT05's correctly.  The VTEDIT macro does not
  9393.      currently support the VT05 keypad.
  9394.  
  9395.      Standard TECO                                            PAGE 187
  9396.      Appendix I
  9397.  
  9398.  
  9399.                                 APPENDIX I
  9400.  
  9401.  
  9402.                      TOPS-10 OPERATING CHARACTERISTICS
  9403.  
  9404.  
  9405.      I.1 STARTUP
  9406.  
  9407.      TECO is started with the
  9408.  
  9409.                .R TECO
  9410.  
  9411.      command.  TECO is now immediately ready to accept commands.   The
  9412.      text buffer and Q-register areas are empty.  Initial commands may
  9413.      also be specifified by  following  the  monitor  command  with  a
  9414.      dollar sign ($) and then some TECO commands.  For example,
  9415.  
  9416.      .R TECO $3EH
  9417.  
  9418.      starts TECO with the help level flag set to 3.
  9419.  
  9420.      The TECO command
  9421.  
  9422.                .TECO filespec
  9423.  
  9424.      is used to edit an already existing file.  It is equivalent to
  9425.  
  9426.                .R TECO
  9427.                *EBfilespec`Y``
  9428.  
  9429.      TOPS-10 "remembers" the filespec as the name  of  the  last  file
  9430.      that has been edited.
  9431.  
  9432.      The MAKE command
  9433.  
  9434.                .MAKE filespec
  9435.  
  9436.      is used to create a new file.  It is equivalent to
  9437.  
  9438.                .R TECO
  9439.                *EWfilespec``
  9440.  
  9441.      TOPS-10 "remembers" the filespec as the name  of  the  last  file
  9442.      that was edited.
  9443.  
  9444.      The command
  9445.  
  9446.                .MAKE filespec1=filespec2
  9447.  
  9448.      is used to edit filespec2 into filespec1.  That is, filespec2  is
  9449.      opened  as the input file, and filespec1 is created as the output
  9450.      file.  It is equivalent to
  9451.  
  9452.      Standard TECO                                            PAGE 188
  9453.      Appendix I
  9454.  
  9455.  
  9456.                .R TECO
  9457.                *ERfilespec2`EWfilespec1`Y``
  9458.  
  9459.      TOPS-10 "remembers" the filespec1 as the name of  the  last  file
  9460.      that was edited.
  9461.  
  9462.      The command
  9463.  
  9464.                .TECO
  9465.  
  9466.      with no arguments, causes CCL to execute the command
  9467.  
  9468.                .TECO filespec
  9469.  
  9470.      where filespec was the file that was previously remembered as the
  9471.      last  file  to be edited.  The system purposely does not remember
  9472.      filenames from one editing session to the next, that is, when you
  9473.      log  out,  the  system  "forgets"  the  name of the file you were
  9474.      editing.
  9475.  
  9476.      TECO-10 does not require the use of the MUNG command  to  execute
  9477.      TECO macros because runnable TECO programs can be created via use
  9478.      of the EE command and these can then be run with the  standard  R
  9479.      or RUN command.  This TECO command has the format
  9480.  
  9481.                EEfilespec`
  9482.  
  9483.      which saves away the  current  image  of  TECO  in  the  filename
  9484.      specified.   The  default  extension  is  .EXE.  When the file is
  9485.      subsequently run (using the  R  or  RUN  monitor  command),  TECO
  9486.      resumes execution with the TECO command immediately following the
  9487.      EE command.
  9488.  
  9489.  
  9490.      I.2 STARTUP CONDITIONS
  9491.  
  9492.      The initial value of the EU flag is 0 if you  are  running  on  a
  9493.      terminal  that  does not support lower case, and is -1 if you are
  9494.      running on a terminal that does support lower case.
  9495.  
  9496.      The initial value of the ET flag is as follows:
  9497.  
  9498.           Bit value      Initial value
  9499.  
  9500.                1         0
  9501.                2         0 (1 if terminal is a scope)
  9502.                4         1
  9503.                8         0
  9504.                16        0
  9505.                32        0
  9506.                64        0
  9507.                128       1 (TECO's prompt sets this to 0)
  9508.                256       0
  9509.  
  9510.      Standard TECO                                            PAGE 189
  9511.      Appendix I
  9512.  
  9513.  
  9514.                512       0 (1 if VT support is present)
  9515.                1024      0
  9516.                2048      0
  9517.  
  9518.      The initial value of the ED flag is 1.
  9519.  
  9520.  
  9521.      I.3 FILE SPECIFICATION
  9522.  
  9523.      The  file  access  commands  ER,  EB,  and  EW  accept   a   file
  9524.      specification in the standard TOPS-10 format:
  9525.  
  9526.                dev:filename.type[p,pn]
  9527.  
  9528.      in which dev:  is a physical  device  name  or  a  user  assigned
  9529.      logical  name;   if  dev:  is not specified, the default DSK:  is
  9530.      assumed.  The filename field must be specified  in  the  commands
  9531.      ER,  EB,  and EW and be a legal TOPS-10 filename.  The type field
  9532.      is a file extension and must be explicitly given the first  time.
  9533.      Thereafter, if a corresponding command is given with no extension
  9534.      specified, the system uses the previously specified extension  as
  9535.      the default.  The same defaulting rules hold for the dev:  field.
  9536.      The <prot> construct is permitted on any output filespecification
  9537.      to allow setting the protection of the file being created.
  9538.  
  9539.  
  9540.      I.4 BACKUP FILES
  9541.  
  9542.      The EB command maintains one level of  file  backup  on  TOPS-10.
  9543.      The pre-edited input file name is changed to
  9544.  
  9545.                filename.BAK
  9546.  
  9547.      before the new output file is  closed  with  the  original  name.
  9548.      Only normal file closing commands (EC, EF, EG, and EX) cause this
  9549.      renaming to happen.  If TECO is aborted or  the  output  file  is
  9550.      purged  by  the EK command, the input filename remains unchanged.
  9551.      Note only one .BAK file for a given name is kept;   earlier  .BAK
  9552.      backup files are deleted each time a new backup file is created.
  9553.  
  9554.      A good policy to follow when editing is to close the edited  file
  9555.      frequently  enough so that an unexpected incident would not cause
  9556.      a substantial loss of work.  Files should be backed up regularly.
  9557.      TECO  has the power to let an unsuspecting user alter a good file
  9558.      into a completely useless state.  The FILCOM program can be  used
  9559.      to verify an editing session.
  9560.  
  9561.  
  9562.      I.5 EXIT AND GO
  9563.  
  9564.      If TECO  is  exited  via  the  EG`  command,  then  TOPS-10  will
  9565.      re-execute  the  last  explicit  compile-class  command  that was
  9566.      executed during that session.
  9567.  
  9568.      Standard TECO                                            PAGE 190
  9569.      Appendix I
  9570.  
  9571.  
  9572.      I.6 <CTRL/C>
  9573.  
  9574.      The action taken when the user types  <CTRL/C>  depends  on  what
  9575.      TECO  is doing.  At command level <CTRL/C> is an immediate action
  9576.      command.  If typed as the  very  first  character  in  a  command
  9577.      string  (not  necessarily the first keystroke) it aborts TECO and
  9578.      returns to the monitor.  No Control-C trapping is available under
  9579.      TOPS-10.   The  ?XAB error message is not supported.  If <CTRL/C>
  9580.      is typed in the middle of entering a command  string,  then  TECO
  9581.      returns  control  to  the  monitor.   Note  that if TECO executes
  9582.      <CTRL/C> as a command from command level, TECO  is  aborted.   If
  9583.      TECO  executes  a  <CTRL/C>  command from within a macro, TECO is
  9584.      also aborted.  If two consecutive <CTRL/C>s are typed while  TECO
  9585.      is  running, or while TECO is typing on the terminal, or while an
  9586.      error message is printing, then control returns to the  operating
  9587.      system.  If one <CTRL/C> is typed to TECO while it is waiting for
  9588.      input, then control returns to the operating system.
  9589.  
  9590.  
  9591.      I.7 EXCEPTIONS
  9592.  
  9593.      TECO-10  does  not  support  the  following  commands  which  are
  9594.      described in this manual:
  9595.  
  9596.           1.  Secondary streams (EP, EA, ER`, EW`)
  9597.  
  9598.           2.  Wildcards (EN)
  9599.  
  9600.           3.  Immediate aids LF and BS.
  9601.  
  9602.      The following incompatibilities exist between TECO-10  and  DEC's
  9603.      TOPS-10 TECO V24:
  9604.  
  9605.           1.  The nA command under TOPS-10 TECO  V24  always  returned
  9606.               the  value  of  the current character, regardless of the
  9607.               value of n.  In TECO-10,  0A  gives  the  value  of  the
  9608.               current character.
  9609.  
  9610.  
  9611.  
  9612.      I.8 USER INITIALIZATION
  9613.  
  9614.      If a user has a file called TECO.INI in his area, then when  TECO
  9615.      starts  up  (via  a CCL command), it will execute the contents of
  9616.      this file (as a TECO macro).  This file must contain a valid TECO
  9617.      program.   TECO.INI will be executed before TECO opens any files.
  9618.      That is, if TECO was invoked via a MAKE command, TECO.INI will be
  9619.      executed before the EW command (for the MAKE) is executed.
  9620.  
  9621.      Standard TECO                                            PAGE 191
  9622.      Appendix I
  9623.  
  9624.  
  9625.      I.9 INSTALLATION INSTRUCTIONS
  9626.  
  9627.      To create TECO for TOPS-10 from the sources, issue the  following
  9628.      commands:
  9629.  
  9630.      .LOAD/MAC/COMPILE TECO10.T10+TECO10.MAC
  9631.      .SAVE TECO10
  9632.      .LOAD/MAC/COMPILE TECERR.T10+TECO10.MAC
  9633.      .SAVE TECERR
  9634.  
  9635.      To create TECO for TOPS-20 from the sources, issue the  following
  9636.      commands:
  9637.  
  9638.      @LOAD/MAC/COMPILE TECO10
  9639.      @SAVE TECO20
  9640.  
  9641.      This builds a raw TECO.  This version of TECO  does  not  contain
  9642.      any window support since the W and :W commands are implemented as
  9643.      macros.  To load window support, issue the following commands:
  9644.  
  9645.      .RUN TECO10 (or TECO20)
  9646.      *EITECO10.TEC``
  9647.      *EETECO``
  9648.  
  9649.      You now have a runnable TECO image with window support.
  9650.  
  9651.      I.10 TMPCOR SUPPORT
  9652.  
  9653.      The EQ and  E%  commands  support  the  pseudo-device  TMP:   for
  9654.      TMPCOR.   Only  the  first three letters of the file name will be
  9655.      used, to try and access a TMPCOR file.  If that  fails,  it  will
  9656.      try  nnnNAM.TMP  where  nnn  is  your  job  number and NAM is the
  9657.      three-character name.  For example:  for job  23,  EQqTMP:FOOBAR`
  9658.      will read TMPCOR file FOO or 023FOO.TMP.
  9659.  
  9660.      I.11 Q-REGISTER NAMES
  9661.  
  9662.      Any printable character (except open parenthesis) is valid  as  a
  9663.      Q-register  name.   A  Q-register  whose  name  is  a  lower case
  9664.      alphabetic character is the same as  the  Q-register  whose  name
  9665.      consists  of the corresponding upper case letter.  Thus Qa and QA
  9666.      are equivalent commands.  Q-register names may also be  up  to  6
  9667.      characters  long,  by  enclosing  the  name  in  parentheses, for
  9668.      example, Q(FOOBAR).  Q-register names may contain  any  printable
  9669.      characters,  however  all  characters other than letters, digits,
  9670.      dollar-sign, space, and underline are reserved for special use by
  9671.      TECO.   A  Q-register  name  consisting  entirely of zero or more
  9672.      spaces is the  same  as  Q-register  (),  which  is  special  and
  9673.      discussed   below.   Trailing  spaces  in  Q-register  names  are
  9674.      discarded, and lower case is converted to upper case.
  9675.  
  9676.      Standard TECO                                            PAGE 192
  9677.      Appendix I
  9678.  
  9679.  
  9680.      I.12 REFERENCING THE TEXT BUFFER AS A Q-REGISTER
  9681.  
  9682.      The Q-register with the null name:  () is the text  buffer.   The
  9683.      numeric  part  of  this  Q-register  is  the  value  of dot.  The
  9684.      sequence [A ]() causes  Q-register  A  to  share  with  the  text
  9685.      buffer.   The  old  main  text  buffer is lost (unless it is also
  9686.      sharing with some Q-register or if  it  has  been  saved  on  the
  9687.      Q-register push-down list).  The text in Q-register A becomes the
  9688.      text buffer and the numeric part of Q-register A is used for  "."
  9689.      if it is in range, otherwise dot is set to 0.
  9690.  
  9691.      I.13 SHARING OF Q-REGISTER POINTERS
  9692.  
  9693.      Q-registers may share their text with each  other  and  with  the
  9694.      text  buffer  as a result of [ and ] commands.  When a Q-register
  9695.      is pushed onto the Q-register pushdown list, all that  is  pushed
  9696.      is  the  numeric part of the Q-register and a pointer to the text
  9697.      part of the Q-register.  Thus a command such as [A ]B would cause
  9698.      Q-registers  A and B to share the same text.  The commands X, ^U,
  9699.      and EQ could be applied to either  Q-register  without  modifying
  9700.      the other, since the Q-register is unbound from its previous text
  9701.      first.  However, the colon-modified forms of X and ^U  append  to
  9702.      the  existing  text,  so  a  :X or :^U command for either of them
  9703.      would affect the other.
  9704.  
  9705.      I.14 EDITING LINE SEQUENCE NUMBERED FILES
  9706.  
  9707.      Some ASCII files have a  special  type  of  line  number  at  the
  9708.      beginning of each line.  These "line-sequence numbers" conform to
  9709.      certain rules so that they may be ignored or treated specially by
  9710.      compilers  and  other  programs.  The standards for line-sequence
  9711.      numbers are given in the LINED Program Reference Manual.
  9712.  
  9713.      TECO does not need line-sequence numbers for operation, but  TECO
  9714.      can  be  used  to  edit files containing them.  If such a file is
  9715.      edited with TECO-10, the line-sequence numbers are, in the normal
  9716.      case,  simply  preserved  as  additional text at the beginning of
  9717.      each line.  The line-sequence numbers may be deleted, edited, and
  9718.      inserted   exactly   like   any   other  text.   On  output,  the
  9719.      line-sequence numbers  are  output  according  to  the  standard,
  9720.      except  that  the  tab  after  the number is output only if it is
  9721.      already there.  Leading zeros are added as necessary.  If a  line
  9722.      without  a  line-sequence  number is encountered, a line-sequence
  9723.      number word of five spaces is placed  at  the  beginning  of  the
  9724.      line.
  9725.  
  9726.      The following switches are available for use  with  line-sequence
  9727.      numebred   files.    These  switches  are  merely  added  to  the
  9728.      appropriate file selection command.
  9729.  
  9730.      ERfilespec/SUPLSN`
  9731.      EBfilespec/SUPLSN`
  9732.  
  9733.      Standard TECO                                            PAGE 193
  9734.      Appendix I
  9735.  
  9736.  
  9737.      causes line sequence numbers to be suppressed at input time.  The
  9738.      numbers will not be read into the editing buffer.  Also, the tabs
  9739.      following the line-sequence  numbers,  if  they  exist,  will  be
  9740.      suppressed.
  9741.  
  9742.      EWfilespec/SUPLSN`
  9743.  
  9744.      causes the line-sequence numbers to be suppressed at output time.
  9745.      Tabs  following the line-sequence numbers will also be suppressed
  9746.      if they exist.
  9747.  
  9748.      EWfilespec/GENLSN`
  9749.      EBfilespec/GENLSN`
  9750.  
  9751.      causes line sequence numbers to be generated for the output  file
  9752.      if  they  did  not  already  exist  in the input file.  Generated
  9753.      line-sequence numbers begin at 00010 and continue with increments
  9754.      of 10 for each line.
  9755.  
  9756.      Note that these switches are needed only if a  change  is  to  be
  9757.      made  in the format of the file being edited.  If no switches are
  9758.      specified, a file is output in the same form as it was input.
  9759.  
  9760.      I.15 COMPILER RESTRICTIONS
  9761.  
  9762.      TECO-10 is a compiler rather than an  interpreter.   This  means,
  9763.      that  before your command string is executed, TECO-10 compiles it
  9764.      into assembly language code.  This makes it must faster than most
  9765.      other TECOs.  Before executing a macro (with the Mq command) TECO
  9766.      compiles the program in the macro.  The next time  the  macro  is
  9767.      executed, TECO notes that the macro has already been compiled and
  9768.      merely branches to the compiled code.  If  the  contents  of  the
  9769.      Q-register  are  changed (via an X or U command), then TECO notes
  9770.      that it must re-compile the commands  should  the  Q-register  be
  9771.      invoked as a macro.
  9772.  
  9773.      One consequence of this is that if a syntax error is detected  in
  9774.      a  command,  no  portion of that command will have been executed.
  9775.      For example, typing the command HK= will  yield  the  ?NAE  error
  9776.      message  and  the  text  buffer  will  NOT  be  cleared.  Another
  9777.      consequence of this is that you  must  not  invoke  a  macro  two
  9778.      different  times  using two different numbers of arguments.  If a
  9779.      macro  gets  initially  invoked  with  two  arguments,  then  all
  9780.      subsequent  invocations  must  supply  two arguments.  Also, TECO
  9781.      cannot tell while compiling an Mq  command  whether  or  not  the
  9782.      macro  returns  a  value.   Therefore  it assumes that a value is
  9783.      always  returned.   This  value  can  be  explicitly  removed  by
  9784.      followed  the  Mq command with an <ESCAPE>.  The MqA command will
  9785.      compile the A command as if it were an nA command rather than  an
  9786.      APPEND.
  9787.  
  9788.      Standard TECO                                            PAGE 194
  9789.      Appendix J
  9790.  
  9791.  
  9792.                                 APPENDIX J
  9793.  
  9794.  
  9795.                      BASIC-PLUS/BASIC-PLUS-2 HANDLING
  9796.  
  9797.  
  9798.      J.1 PURPOSE
  9799.  
  9800.      In  BASIC-PLUS  and  BASIC-PLUS-2  a  program  statement  may  be
  9801.      continued over more than one text line.  A text line which is not
  9802.      the last text line of a given statement may need to be flagged as
  9803.      a  "continued"  line.   (See  the  appropriate language reference
  9804.      manual  for  requirements  of  each  version  of  each   language
  9805.      processor.)
  9806.  
  9807.      The standard continuation flag is the & character.  A line  which
  9808.      must  be  marked  as "continued" is written with an & as the last
  9809.      non-whitespace character before the <CR><LF>.
  9810.  
  9811.      (An older form of continuation was, in BASIC-PLUS  only,  to  end
  9812.      the text line by typing a <LF> key instead of <CR>.)
  9813.  
  9814.      The switches described in this appendix cause TECO to  manipulate
  9815.      the  text  files in such a way that each text line appears in the
  9816.      editing buffer to be completely "conventional":   that  is,  each
  9817.      text  line  ends with a standard <CR><LF>, and no text line has a
  9818.      trailing  &  character.   You  can  correctly  edit   well-formed
  9819.      BASIC-PLUS  or  BASIC-PLUS-2  source  files  without having to be
  9820.      concerned about continuation conventions.
  9821.  
  9822.  
  9823.      J.2 METHOD
  9824.  
  9825.      TECO allows you to work with "unemcumbered" lines in the  editing
  9826.      buffer  by removing continuation conventions as each text line is
  9827.      read  in.   You  indicate  that  you  want  this  processing   by
  9828.      specifying  a switch on the file specification supplied to the ER
  9829.      (or the EB) command.
  9830.  
  9831.      TECO (again) adds appropriate continuation  conventions  to  each
  9832.      text  line  as  it  is  written out from the editing buffer.  You
  9833.      indicate that you want this processing by specifying a switch  on
  9834.      the file specification supplied to the EW (or the EB) command.
  9835.  
  9836.  
  9837.      J.3 INPUT PROCESSING
  9838.  
  9839.      As TECO reads each new text line into the editing buffer,  it  is
  9840.      examined  for  a  trailing  &  character.   If one is found, TECO
  9841.      removes it, and then additionally  removes  any  trailing  spaces
  9842.      and/or tabs.
  9843.  
  9844.      (In the case of <LF> continuation, TECO  converts  that  kind  of
  9845.  
  9846.      Standard TECO                                            PAGE 195
  9847.      Appendix J
  9848.  
  9849.  
  9850.      line terminator character sequence to <CR><LF>.)
  9851.  
  9852.      The available switches follow.  (Consult the appropriate appendix
  9853.      to see which switches are supported on your operating system.)
  9854.  
  9855.             /B2    TECO strips trailing & sequences
  9856.  
  9857.             /n     Same as /B2 for input processing
  9858.  
  9859.             /B+    TECO changes <LF><CR><NUL>
  9860.                    sequences to <CR><LF>.
  9861.  
  9862.  
  9863.      J.4 OUTPUT PROCESSING
  9864.  
  9865.      As TECO writes each text line from the editing buffer, it takes a
  9866.      look  at  the text line which will follow.  If the following line
  9867.      begins with a digit, the current line is written without  change.
  9868.      If  the  following line does not begin with a digit, TECO assumes
  9869.      that the current line must be continued.
  9870.  
  9871.      The convention applied to an output text line which TECO marks as
  9872.      "continued"  depends  on  the  form  of  the  switch you specify.
  9873.      (Consult the appropriate  appendix  to  see  which  switches  are
  9874.      supported on your operating system.)
  9875.  
  9876.             /B2    TECO appends a space and an &
  9877.  
  9878.             /n     TECO appends an &, after padding out
  9879.                    the line with tabs and/or spaces to make
  9880.                    the & appear in column n
  9881.  
  9882.             /B+    TECO ends the line with a
  9883.                    <LF><CR><NUL> sequence
  9884.                    (instead of <CR><LF>.)
  9885.  
  9886.  
  9887.      J.5 FORM FEED INTERACTION
  9888.  
  9889.      When TECO reads a page of text into the editing buffer, it  stops
  9890.      when  a  <form feed> character is encountered, or when the buffer
  9891.      has been filled to capacity.  In the latter case, the  last  line
  9892.      will  be complete, and will include its line delimiter.  However,
  9893.      no look-ahead is done to examine the next line in the file.
  9894.  
  9895.      If TECO is being used with one of the switches described in  this
  9896.      appendix,  a  very  long BASIC-PLUS-x source program which is not
  9897.      segmented with <FF> characters can cause the  last  line  in  the
  9898.      buffer  to  not  be  the  last  text  line of a multi-line source
  9899.      statement.
  9900.  
  9901.      When the buffer is written to the output file, TECO has no way of
  9902.      determining  whether  the  next  text line (the first line of the
  9903.  
  9904.      Standard TECO                                            PAGE 196
  9905.      Appendix J
  9906.  
  9907.  
  9908.      next buffer load) will begin with a line number.  TECO makes  the
  9909.      assumption  that  the  buffer's  last  text  line  is  not  to be
  9910.      "continued", and terminates it with <CR><LF>.  If this assumption
  9911.      is  incorrect (frequently the case), remaining text lines of that
  9912.      multi-line  statement  will  be  lost   when   the   program   is
  9913.      subsequently OLDed.
  9914.  
  9915.      To  avoid  this  problem,  lengthy  BASIC-PLUS  or   BASIC-PLUS-2
  9916.      programs  should  be segmented with <form feed> characters before
  9917.      editing  them   using   these   TECO   switches.    Segments   of
  9918.      approximately  150  to  200 lines are convenient.  Starting a new
  9919.      page even more frequently to make listings readable isn't  a  bad
  9920.      idea, either.
  9921.  
  9922.      Standard TECO                                            PAGE 197
  9923.      Glossary
  9924.  
  9925.  
  9926.                       GLOSSARY OF OBSCURE TECO TERMS
  9927.  
  9928.  
  9929.      Accent grave
  9930.                     The `  character.   Echoed  for  TECO's  text  and
  9931.                     command  string delimiter when an ESCape surrogate
  9932.                     is  in  effect.   Actually  set  as   the   ESCape
  9933.                     surrogate by the 8192 ET bit.
  9934.  
  9935.      Abort-on-error bit
  9936.                     The 128's bit of the ET flag.  If this bit is set,
  9937.                     then  TECO will abort execution on encountering an
  9938.                     error  (after  printing  the  error  message)  and
  9939.                     control returns to the operating system.  This bit
  9940.                     is initially set when TECO starts up, but is reset
  9941.                     whenever TECO issues its prompt.
  9942.  
  9943.      <ALTMODE>      One  of  several  characters  that   TECO   treats
  9944.                     specially for use as a delimiter.  Known as ESCAPE
  9945.                     in more recent times, but traditional  TECO  users
  9946.                     will still go on ending their command strings with
  9947.                     "ALT" "ALT".
  9948.  
  9949.      Anchored search
  9950.                     A search (S) or search and  replace  (FS)  command
  9951.                     that is preceded by a ::.  This indicates that the
  9952.                     search  must  match  the  characters   immediately
  9953.                     following  the current pointer position.  If these
  9954.                     characters do not match, no further  searching  is
  9955.                     performed  and  the  text  buffer pointer does not
  9956.                     move.
  9957.  
  9958.      Argument pair  A command of the  form  m,n  where  m  and  n  are
  9959.                     numbers  (or  TECO  commands that return numbers).
  9960.                     When used before a command that normally  acts  on
  9961.                     lines,  the  argument  pair  causes the command to
  9962.                     work on characters.  The characters  specified  by
  9963.                     this  argument  pair  is  the  set  of  characters
  9964.                     between pointer positions m and n.  The  number  m
  9965.                     should normally be less than or equal to n.
  9966.  
  9967.      ASCII  code     The  American  Standard  Code   for   Information
  9968.                     Interchange.   The  code used by TECO to represent
  9969.                     characters internally.   Consult  Appendix  A  for
  9970.                     details.
  9971.  
  9972.      @-sign modified command
  9973.                     A command that is preceded by an @-sign modifier.
  9974.  
  9975.      @-sign modifier
  9976.                     An  at-sign  (@)  that  proceeds  a  command.   It
  9977.                     indicates  to TECO that the string argument to the
  9978.                     command  is  to  delimited  on  both  sides  by  a
  9979.  
  9980.      Standard TECO                                            PAGE 198
  9981.      Glossary
  9982.  
  9983.  
  9984.                     user-supplied   delimiter   rather   than   to  be
  9985.                     delimited only at the  end  by  a  TECO-designated
  9986.                     delimiter (normally <ESCAPE>).
  9987.  
  9988.      Automatic refresh
  9989.                     A  refresh  of  the  buffer  display   done   when
  9990.                     scrolling  is  active  (when 7:W is non-zero) just
  9991.                     before TECO issues its asterisk prompt.  Automatic
  9992.                     refresh can be disabled by the 128 ED bit.
  9993.  
  9994.      Automatic type out
  9995.                     The feature of TECO that causes lines of  text  to
  9996.                     be  automatically  typed  out.  The ES flag may be
  9997.                     used to control the automatic type  out  of  lines
  9998.                     after search commands, and the EV flag may be used
  9999.                     to cause automatic type out of lines after command
  10000.                     execution.
  10001.  
  10002.      Auto-trace mode
  10003.                     A mode that TECO goes into when the 4's bit of the
  10004.                     EH  (Help-level)  flag is set.  In this mode, TECO
  10005.                     will automatically print out the erroneous command
  10006.                     string after an error occurs.
  10007.  
  10008.      Backup protection
  10009.                     The process of preserving the user's original file
  10010.                     (as  a  backup) when editing that file with the EB
  10011.                     (Edit with Backup) command.
  10012.  
  10013.      Backwards searches
  10014.                     A search that proceeds in the backwards direction.
  10015.                     If  the  string being looked for does not occur at
  10016.                     the current pointer position, the pointer position
  10017.                     is  moved  back  one  character  and the search is
  10018.                     tried again.  This continues until the  string  is
  10019.                     found or until the boundary of the search has been
  10020.                     reached or until the beginning of the current text
  10021.                     buffer  has  been  reached.  Backward searches are
  10022.                     initiated by using a negative argument to a search
  10023.                     command  or  by  using an argument pair m,n with m
  10024.                     greater than n to an FB or FC command.
  10025.  
  10026.      Bounded searches
  10027.                     A search command that requires  searching  only  a
  10028.                     portion   of   the  text  buffer.   Of  particular
  10029.                     importance is the case  where  you  only  want  to
  10030.                     search  the  current  line  for  a  given  string.
  10031.                     Bounded searches are  accomplished  using  the  FB
  10032.                     command.
  10033.  
  10034.      Case flagging  A mode of TECO wherein, on type out, it will  flag
  10035.                     alphabetic  characters  (in  either upper or lower
  10036.                     case) by  preceding  them  with  a  single  quote.
  10037.  
  10038.      Standard TECO                                            PAGE 199
  10039.      Glossary
  10040.  
  10041.  
  10042.                     Lower  case  flagging  is  particularly  useful on
  10043.                     terminals that do not display  lower  case.   Case
  10044.                     flagging  is  controlled  by  EU,  the  case flag.
  10045.                     Setting EU to 0 sets  lower  case  flagging  mode;
  10046.                     setting EU to 1 sets upper case flagging mode, and
  10047.                     setting EU to -1 removes all case flagging.
  10048.  
  10049.      Character-oriented editor
  10050.                     An  editor  that  allows  modification  of  single
  10051.                     characters,  so  that  if  just one character of a
  10052.                     line is wrong, the entire line does not have to be
  10053.                     retyped.   TECO  is  a  character-oriented  editor
  10054.                     (although  it  has  a  number  of  facilities  for
  10055.                     dealing with text lines, too).
  10056.  
  10057.      Colon-modified command
  10058.                     A  command  that  is  preceded  by  a  colon   (:)
  10059.                     modifier.
  10060.  
  10061.      Colon-modifier
  10062.                     A colon preceding a TECO command, used to indicate
  10063.                     that  the  action  of  the  command  is to change.
  10064.                     Frequently indicates that the command is to return
  10065.                     a  value  (-1  if  the command succeeded, 0 if the
  10066.                     command failed).
  10067.  
  10068.      Command line   The current line of the  command  string  that  is
  10069.                     being typed into TECO.
  10070.  
  10071.      Command string scope editing
  10072.                     The feature of TECO that is enabled  when  editing
  10073.                     is  performed  on  a  CRT terminal.  In this mode,
  10074.                     typing  the  immediate  action  <DELETE>   command
  10075.                     causes  the  character  deleted  from  the command
  10076.                     string to physically disappear  from  the  screen.
  10077.                     Other  commands,  such  as  <CTRL/U>  also  behave
  10078.                     differently,  taking   best   advantage   of   the
  10079.                     properties of a video terminal.
  10080.  
  10081.      Command string
  10082.                     The string of  TECO  commands  that  is  currently
  10083.                     being  typed  into  TECO,  or  is  currently being
  10084.                     executed by TECO.
  10085.  
  10086.      Comment        An informative message used within a TECO program,
  10087.                     to  make  the  code  more  readable.   The comment
  10088.                     explains the meaning and purpose of the associated
  10089.                     TECO   commands.    The  comment  is  enclosed  in
  10090.                     exclamation marks.
  10091.  
  10092.      Compile-class command
  10093.                     A set  of  operating  systems  commands  (such  as
  10094.                     COMPILE)  that causes compilation (translation) of
  10095.  
  10096.      Standard TECO                                            PAGE 200
  10097.      Glossary
  10098.  
  10099.  
  10100.                     a source file written in a computer language  into
  10101.                     machine  instructions.   The EG` command is useful
  10102.                     to finish an editing session  and  re-execute  the
  10103.                     last  compile-class  command  (normally  a command
  10104.                     that compiles the file that was just edited).
  10105.  
  10106.      Conditional    A TECO language construct used to specify code  to
  10107.                     be   conditionally  executed  depending  upon  the
  10108.                     results of some test.  The most  general  form  of
  10109.                     the TECO conditional is
  10110.                               n"X <then-clause> | <else-clause> '
  10111.                     which tests the number n using  condition  X  (See
  10112.                     section 5.13 for details).  The commands specified
  10113.                     by the <then-clause> are executed if the condition
  10114.                     succeeds,  otherwise the commands specified by the
  10115.                     <else-clause> are executed.
  10116.  
  10117.      Control-character
  10118.                     An ASCII character whose  octal  code  is  in  the
  10119.                     range  0-37.   Usually  denoted  in this manual by
  10120.                     <CTRL/X> where X is the character whose ASCII code
  10121.                     is 100 (octal) greater than the ASCII code for the
  10122.                     control   character   being   represented.    TECO
  10123.                     displays  such  a character as ^X (Caret-X) except
  10124.                     for <TAB>, <LF>, <VT>, <FF>, AND <CR>  which  have
  10125.                     their normal display, and <ESC> which is displayed
  10126.                     as $ (dollar sign) or, if a user-designated ESCAPE
  10127.                     surrogate  is  in  effect,  as  `  (accent grave).
  10128.                     Anytime a single control-character, <CTRL/X> is  a
  10129.                     valid  TECO  command,  the two-character sequence,
  10130.                     ^X, may be used instead.
  10131.  
  10132.      <CTRL/C> trapping
  10133.                     A mode of operation  wherein  a  TECO  macro  will
  10134.                     regain control (rather than TECO) when <CTRL/C> or
  10135.                     <CTRL/C><CTRL/C> is typed on the  user's  terminal
  10136.                     to  abort execution of the current command string.
  10137.                     <CTRL/C>  trapping  is  enabled  by  setting   the
  10138.                     high-order bit of the ET flag.
  10139.  
  10140.      Current character
  10141.                     The character immediately  following  the  current
  10142.                     text buffer pointer position.
  10143.  
  10144.      Cursor         A visible  pattern  on  a  CRT  terminal  (usually
  10145.                     blinking)  that  would  specify  to  a  true scope
  10146.                     editor (like VTEDIT) the current location  of  the
  10147.                     text  buffer  pointer,  or which would specify the
  10148.                     location where subsequently typed characters would
  10149.                     be displayed.
  10150.  
  10151.      Standard TECO                                            PAGE 201
  10152.      Glossary
  10153.  
  10154.  
  10155.      <DELIM>        Terminology in this manual for an ESCape typed  at
  10156.                     the   console   and  passed  to  TECO.   On  newer
  10157.                     terminals, there  may  be  no  ESCape  key.   Some
  10158.                     versions   of   TECO   provide   for   an  "ESCape
  10159.                     surrogate", a  user-designated  key  which  is  to
  10160.                     cause transmission of an ESCape to TECO.  The term
  10161.                     <DELIM> is used to indicate an ESCape  transmitted
  10162.                     to TECO whether it was generated by the designated
  10163.                     "surrogate" key or by a  "real"  ESCape  key.   An
  10164.                     ESCape  types out as ` when a surrogate is active,
  10165.                     but as $ when no surrogate is active.
  10166.  
  10167.      Destructive search
  10168.                     A form of global search in  which  pages  of  text
  10169.                     that are passed over (because they did not contain
  10170.                     the  string  being  searched  for)  are  discarded
  10171.                     rather   than   written   to   the   output  file.
  10172.                     Destructive searches are initiated in TECO via use
  10173.                     of the _ command.
  10174.  
  10175.      Display editor
  10176.                     A true display editor is on which  makes  efficent
  10177.                     use  of  a CRT terminal or display scope.  Such an
  10178.                     editor maintains a "window" into  the  text  being
  10179.                     edited.   As characters are typed on the terminal,
  10180.                     these characters immediately are entered into  the
  10181.                     text  buffer and the window is immediately updated
  10182.                     to reflect this change.  With  the  help  of  some
  10183.                     macro  support,  TECO  can  be  made  to be a true
  10184.                     display editor.   A  more  modest  use  of  a  CRT
  10185.                     terminal  (and which requires no macro support) is
  10186.                     scrolling, q.v.
  10187.  
  10188.      Dot            A mnemonic for "the current  text  buffer  pointer
  10189.                     position".   Stems from the fact that the .  (dot,
  10190.                     or period) TECO command returns this number as its
  10191.                     value.
  10192.  
  10193.      E command      One of several two-character  TECO  commands  that
  10194.                     start with the letter 'E'.
  10195.  
  10196.      Echo mode      A normal mode of  operation  in  which  TECO  will
  10197.                     automatically  echo  (display) each character that
  10198.                     is typed in response to a ^T command.  Opposite of
  10199.                     no-echo  mode.  This mode is controlled by the 8's
  10200.                     bit of the ET flag.  (0 means no-echo mode.)
  10201.  
  10202.      ED flag        The edit level flag.
  10203.  
  10204.      Edit-class command
  10205.                     A type of operating system command (such  as  MAKE
  10206.                     and  TECO)  that specifies that file editing is to
  10207.                     occur.   Many  operating  systems   remember   the
  10208.  
  10209.      Standard TECO                                            PAGE 202
  10210.      Glossary
  10211.  
  10212.  
  10213.                     argument   specified   with  the  last  Edit-class
  10214.                     command, so  that  the  next  time  an  edit-class
  10215.                     command  is used without an argument, the previous
  10216.                     argument can be recalled.
  10217.  
  10218.      Edit level flag
  10219.                     A bit-encoded flag, referenced by the ED  command,
  10220.                     that   describes   how  TECO  should  behave  with
  10221.                     reference to certain features.  See  section  5.16
  10222.                     for more details.
  10223.  
  10224.      Edit verify flag
  10225.                     A flag that describes how TECO  should  act  after
  10226.                     processing  of a command string.  This flag can be
  10227.                     set so that TECO will display the line just edited
  10228.                     on  the  terminal after each command.  See section
  10229.                     5.16 for more details.
  10230.  
  10231.      EH flag        The help level flag.
  10232.  
  10233.      Either-case search mode
  10234.                     A standard mode of operation in  which  alphabetic
  10235.                     characters  specified  within  a search string are
  10236.                     permitted to match a  corresponding  character  of
  10237.                     either upper or lower case.
  10238.  
  10239.      Else-clause    The part of a conditional command that is executed
  10240.                     if the condition is not satisfied.  In TECO, these
  10241.                     are the commands that occur between the | and  the
  10242.                     ' characters within the conditional construct.
  10243.  
  10244.      End-of-file flag
  10245.                     A read-only flag, referenced  by  the  ^N  command
  10246.                     that specifies whether or not end-of-file has been
  10247.                     seen on the currently selected  input  stream.   A
  10248.                     value  of  0  means  that end-of-file has not been
  10249.                     seen;  a value of -1 means  that  end-of-file  has
  10250.                     been  reached.   This  flag  is initially 0 and is
  10251.                     reset to 0 each time a new file  is  selected  for
  10252.                     input.
  10253.  
  10254.      EO level       The current version level of TECO-10.
  10255.  
  10256.      ES flag        The search verification flag.
  10257.  
  10258.      <ESCAPE>       The character whose ASCII code is 33 (octal).   It
  10259.                     is  a  general-purpose  delimiter  used  by  TECO.
  10260.                     Traditionally known  as  an  <ALTMODE>.   When  no
  10261.                     ESCape surrogate is active, an ESCape types out as
  10262.                     $ (dollar sign).  See also <DELIM>.
  10263.  
  10264.      Standard TECO                                            PAGE 203
  10265.      Glossary
  10266.  
  10267.  
  10268.      ESCape surrogate
  10269.                     A character (designated via the 8192  ET  bit,  or
  10270.                     via  the  EE  flag)  which  causes an ESCape to be
  10271.                     transmitted to TECO.  When an ESCape surrogate  is
  10272.                     active,  an  ESCape types out as ` (accent grave).
  10273.                     See also <DELIM>.
  10274.  
  10275.      ET flag        The terminal characteristics flag
  10276.  
  10277.      EU flag        The upper/lower case flag.
  10278.  
  10279.      EV flag        The edit verify flag.
  10280.  
  10281.      Exact-case search mode
  10282.                     A mode of operation in which alphabetic characters
  10283.                     within  a  search string must match the exact case
  10284.                     (upper  case  or   lower   case)   of   characters
  10285.                     specified.
  10286.  
  10287.      Exit Protection
  10288.                     A protective feature of TECO that prevents a  user
  10289.                     from  exiting  TECO  if a potential los of data is
  10290.                     imminent.  The EX  and  EG  commands  are  aborted
  10291.                     (with  the ?NFO error message) if there is text in
  10292.                     the text buffer, but no output file is open.
  10293.  
  10294.      F command      One of several two-character  TECO  commands  that
  10295.                     start with the letter 'F'.
  10296.  
  10297.      Flag           A data register used by TECO  to  control  various
  10298.                     modes  of operation.  The contents of the flag are
  10299.                     set by specifying the new value  before  the  flag
  10300.                     name;   and the contents are returned by using the
  10301.                     flag name without a numeric  argument.   The  TECO
  10302.                     flags  are:   ^X,  ^E, ^N, ED, EE, EH, EO, ES, ET,
  10303.                     EU, and EV.
  10304.  
  10305.      Flow command   A TECO-11 command that is used to flow (branch) to
  10306.                     a  particular  flow  control  character.  The flow
  10307.                     commands are F<, F>, F', and F|.
  10308.  
  10309.      Form feed flag
  10310.                     A read-only flag, referenced  by  the  ^E  command
  10311.                     that  specifies  whether  the previous append from
  10312.                     the input file terminated because of  encountering
  10313.                     a  form  feed  character  in  the  input  file, or
  10314.                     because the text buffer became nearly  full.   The
  10315.                     value  of  this flag is automatically set to -1 by
  10316.                     TECO if input is terminated by the presence  of  a
  10317.                     form feed character in the input file.
  10318.  
  10319.      Standard TECO                                            PAGE 204
  10320.      Glossary
  10321.  
  10322.  
  10323.      Garbage collection
  10324.                     A process used by TECO-10 to collect unused memory
  10325.                     when more memory is required.
  10326.  
  10327.      Global Q-register
  10328.                     A Q-register available throughout all macro levels
  10329.                     (including "outside", or at prompt level).  Global
  10330.                     Q-registers are named A-Z and 0-9.  See also Local
  10331.                     Q-Registers, and section 3.3.2.
  10332.  
  10333.      Global search  A type of search that continues through the entire
  10334.                     input  file  until  the  specified  characters are
  10335.                     found.  Successive pages of the file are read into
  10336.                     the  text  buffer  and  then  written out into the
  10337.                     output  file  (if  the  string  is  not  located).
  10338.                     Global  searches  in  TECO are initiated via the N
  10339.                     command.
  10340.  
  10341.      Hard-copy editing mode
  10342.                     A mode of operation that TECO uses when the user's
  10343.                     terminal  is  not  a  CRT.   In  this mode, when a
  10344.                     character is rubbed out using  the  <DELETE>  key,
  10345.                     the   rubbed-out  character  is  re-typed  on  the
  10346.                     terminal  as  a  visible  indication   that   this
  10347.                     character  was  rubbed  out.   Opposite  of  scope
  10348.                     editing mode.  This mode can be entered, even on a
  10349.                     scope  terminal, by turning off the 2's bit of the
  10350.                     ET flag.
  10351.  
  10352.      Help level flag
  10353.                     A bit-encoded flag, referenced by the EH  command,
  10354.                     that controls properties of TECO having to do with
  10355.                     error messages and user assistance.
  10356.  
  10357.      Immediate command
  10358.                     A special command to  TECO  that  takes  immediate
  10359.                     effect,   requiring   no  <DELIM>s  to  begin  its
  10360.                     execution.
  10361.  
  10362.                     "Immediate action editing characters" are commands
  10363.                     such  as  <DELETE>  and  <CTRL/U>,  which  perform
  10364.                     editing of the TECO command string currently being
  10365.                     typed in.  See section 4.1.
  10366.  
  10367.                     An   "immediate   inspection   command"    is    a
  10368.                     single-character command which can be typed as the
  10369.                     very  first  character  after   TECO's   prompting
  10370.                     asterisk,  and  which  causes the current location
  10371.                     counter to be  moved  by  one  line  and  the  new
  10372.                     current  line  to be typed out.  Examples are <LF>
  10373.                     and <BS>.  See section 1.6.1.
  10374.  
  10375.                     "Immediate action  commands"  are  other  commands
  10376.  
  10377.      Standard TECO                                            PAGE 205
  10378.      Glossary
  10379.  
  10380.  
  10381.                     which  may  be  typed right after TECO's prompting
  10382.                     asterisk,   such   as   the   *q   to   save   the
  10383.                     previously-typed command in a Q-register or the ^W
  10384.                     to re-display  a  scrolling  buffer  window.   See
  10385.                     section 4.2.
  10386.  
  10387.                     "Immediate ESCape sequence" commands  are  invoked
  10388.                     by  keys  which generate escape sequences, such as
  10389.                     "arrow" or "auxiliary keypad" keys.   See  section
  10390.                     4.4.   Such  commands  are usually used to perform
  10391.                     editing of the TECO command string currently being
  10392.                     entered  into  TECO.   For  example,  the commands
  10393.                     <DELETE>  and  <CTRL/U>   are   immediate   action
  10394.                     commands.
  10395.  
  10396.      Iteration      A language construct that permits  a  sequence  of
  10397.                     operations  to  be  re-executed  indefinitely or a
  10398.                     given  number  of  times.   In   TECO,   this   is
  10399.                     accomplished  by  enclosing  the commands in angle
  10400.                     brackets.
  10401.  
  10402.      Kernel         The TECO-11 kernel refers to  the  TECO-11  module
  10403.                     that implements all those features of TECO-11 that
  10404.                     are  common  to  all  PDP-11  operating   systems.
  10405.                     Operating   system   specific   features  and  the
  10406.                     interface to the operating system is  accomplished
  10407.                     by  linking an I/O module tailored for the desired
  10408.                     operating system with the kernel.
  10409.  
  10410.      Keypad editor  A true scope editor that uses special keys on  the
  10411.                     terminal  (such  as  a  VT52  or VT100) to control
  10412.                     editing functions.  VTEDIT  is  an  example  of  a
  10413.                     keypad editor.
  10414.  
  10415.      Line           A portion of text delimited by <LF>,  <VT>,  <FF>,
  10416.                     or  the  beginning or end of the text buffer.  The
  10417.                     final delimiter is considered to be  part  of  the
  10418.                     line.
  10419.  
  10420.      Line-numbered file
  10421.                     In TOPS-10,  an  ASCII  file  that  contains  line
  10422.                     numbers  embedded in the start of each line.  TECO
  10423.                     does not  require  these  line  numbers,  but  can
  10424.                     handle them if they are present.  They can also be
  10425.                     generated  or  suppressed  via  the  /GENLSN   and
  10426.                     /SUPLSN switches respectively.
  10427.  
  10428.      Line-oriented editor
  10429.                     An editor that  primarily  uses  line  numbers  to
  10430.                     direct  editing,  and  most  of whose commands are
  10431.                     line-oriented.   TECO  is   a   character-oriented
  10432.                     editor,  but  also  has  many facilities that work
  10433.                     with lines.
  10434.  
  10435.      Standard TECO                                            PAGE 206
  10436.      Glossary
  10437.  
  10438.  
  10439.      Line-wrap mode
  10440.                     A standard mode of TECO's window  support  wherein
  10441.                     lines  that  are  too  long  to  fit  on  a single
  10442.                     physical  line  of   the   user's   terminal   are
  10443.                     automatically   continued   on   the   next  line.
  10444.                     Opposite of truncate mode.
  10445.  
  10446.      Literal type out mode
  10447.                     A mode that TECO can be put into  by  setting  the
  10448.                     1's bit in the ET flag, or (for a single character
  10449.                     on a one-shot basis) by using the :^T command.  In
  10450.                     this  mode, any characters typed by a TECO program
  10451.                     via use of one of the commands T, V,  ^A,  or  :G,
  10452.                     will  be  displayed on the user's terminal without
  10453.                     any modification.  When not  in  this  mode,  TECO
  10454.                     will convert characters that normally do not print
  10455.                     to a form that can  be  displayed  on  the  user's
  10456.                     terminal   (e.g.   <CTRL/X>  displays  as  ^X  and
  10457.                     <ESCAPE> displays as $ or,  if  a  user-designated
  10458.                     ESCAPE  surrogate  is  in  effect, as `).  Literal
  10459.                     type  out  mode  is  useful  when  trying  to   do
  10460.                     real-time  displays  on  a  CRT  terminal.  Normal
  10461.                     (up-arrow) mode is particularly useful to let  you
  10462.                     see what characters are really in your file.
  10463.  
  10464.      Local Q-register
  10465.                     A Q-register available  to  only  a  single  macro
  10466.                     level  (including  "outside", or at prompt level).
  10467.                     The local Q-registers for a particular macro level
  10468.                     are  automatically  saved  and  restored  by  TECO
  10469.                     around execution of a  lower-level  macro.   Local
  10470.                     Q-registers  are  named .A-.Z and .0-.9.  See also
  10471.                     Global Q-Registers, and section 3.3.2.
  10472.  
  10473.      Log file       An audit trail that TECO-10 can keep  showing  all
  10474.                     the  commands  that  were typed to TECO and/or all
  10475.                     the type out made by TECO.   This  is  useful  for
  10476.                     reviewing  what went wrong with a 'bad' edit.  The
  10477.                     log file is initiated with  the  EL  command  (see
  10478.                     Appendix C).
  10479.  
  10480.      Macro          A sequence of TECO commands intended to be  loaded
  10481.                     into a Q-register and executed as a TECO program.
  10482.  
  10483.      Macro level    Two commands within the same TECO macro  are  said
  10484.                     to  be  at  the  same  macro level.  When one TECO
  10485.                     macro calls another, the calling macro is said  to
  10486.                     be at the higher macro level, and the called macro
  10487.                     at the lower macro level.
  10488.  
  10489.      Match control construct
  10490.                     A   command,   consisting   of   certain   special
  10491.                     characters,   used   within  a  search  string  to
  10492.  
  10493.      Standard TECO                                            PAGE 207
  10494.      Glossary
  10495.  
  10496.  
  10497.                     indicate to TECO that special groups of characters
  10498.                     are permitted to match at this point.
  10499.  
  10500.      Memory expansion
  10501.                     TECO's act of acquiring  additional  storage  from
  10502.                     the  operating system when the currently allocated
  10503.                     storage is insufficient to handle the current TECO
  10504.                     command.   Typically, TECO will attempt to acquire
  10505.                     this additional memory before it  completely  runs
  10506.                     out  of memory, so as to allow a 'buffer zone' for
  10507.                     the user.  This allows him to complete a few  more
  10508.                     commands  even in the case where TECO is unable to
  10509.                     get more memory.   The  informative  message  "[nK
  10510.                     Bytes]"  or  its  equivalent  is  printed  on  the
  10511.                     terminal informing the user that memory usage  has
  10512.                     expanded.
  10513.  
  10514.      Mung           A recursive acronym for "Mung Until No Good";   an
  10515.                     act  applied  by novice TECO users to their source
  10516.                     files.
  10517.  
  10518.      MUNG command   An operating  system  command  used  to  invoke  a
  10519.                     pre-written  TECO  program.  The most general form
  10520.                     of this command is "MUNG file,data"  where  "file"
  10521.                     is  the  name of a TECO source program, and "data"
  10522.                     is data to be passed to that program.
  10523.  
  10524.      No-echo mode   A  mode  of  operation  in  which  TECO  will  not
  10525.                     automatically  echo  (display) the character typed
  10526.                     by the user in response to the ^T  command.   This
  10527.                     mode  is  entered by setting the 8's bit of the ET
  10528.                     flag.  Opposite of echo mode.
  10529.  
  10530.      Page           A portion of text delimited by  form  feeds.   The
  10531.                     form  feeds  are  not considered to be part of the
  10532.                     page.  Sometimes the term 'page' is used to  refer
  10533.                     to all the text currently in the text buffer.
  10534.  
  10535.      Panic Mode     A condition that  occurs  (on  small,  single-user
  10536.                     operating   systems),   when,  in  the  middle  of
  10537.                     outputting during an edit, the output device fills
  10538.                     up so that the I/O transfer cannot continue.  TECO
  10539.                     recovers  gracefully  from   this   condition   by
  10540.                     printing  the  ?FUL  error  message  and returning
  10541.                     control to TECO without any loss of data.  At this
  10542.                     point, the user closes the current output file and
  10543.                     opens another one on  another  device  (with  more
  10544.                     room)  and resumes editing.  At a subsequent time,
  10545.                     the two parts of his file can be concatenated back
  10546.                     together.
  10547.  
  10548.      Standard TECO                                            PAGE 208
  10549.      Glossary
  10550.  
  10551.  
  10552.      Pipeline editor
  10553.                     An editor which only makes sequential edits  to  a
  10554.                     file.  The file to be edited is read into the text
  10555.                     buffer one piece at a time.  Each piece is  edited
  10556.                     and  then  written  out.   Once  a  piece has been
  10557.                     written out, further editing to that piece is  not
  10558.                     possible  unless the output file is re-opened in a
  10559.                     later edit as a new file to be edited.  TECOs  are
  10560.                     pipeline editors, with the exception of TECO-11 on
  10561.                     VAX/VMS  (which  offers  the  capability  to  page
  10562.                     backwards as well as forward).
  10563.  
  10564.      Pointer preservation mode
  10565.                     A mode of  operation  in  which  the  text  buffer
  10566.                     pointer  will  not  change after a failing search.
  10567.                     This mode is controlled by the 16's bit of the  ED
  10568.                     flag.
  10569.  
  10570.      Primary input stream
  10571.                     A term used by TECO-11 to refer to the main  input
  10572.                     file that TECO is using.
  10573.  
  10574.      Primary output stream
  10575.                     A term used by TECO-11 to refer to the main output
  10576.                     file that TECO is using.
  10577.  
  10578.      Prompt level   A TECO command is said to be executed from  prompt
  10579.                     level  if  it was typed in directly in response to
  10580.                     TECO's prompt, as opposed to being executed from a
  10581.                     macro.
  10582.  
  10583.      Q-register     One of  36  global  or  36  local  user-accessible
  10584.                     registers  provided  by TECO.  Each Q-register can
  10585.                     hold both a number  and  a  string  of  text.   Of
  10586.                     particular importance is the ability to store TECO
  10587.                     command strings  in  Q-registers  to  be  used  as
  10588.                     "macros".
  10589.  
  10590.      Q-register push down list
  10591.                     A last-in first-out stack available to  users  for
  10592.                     saving and restoring the contents of Q-registers.
  10593.  
  10594.      Read-with-no-wait mode
  10595.                     A mode of operation in which the ^T  command  will
  10596.                     not  hang  until  a  key  is  typed  on the user's
  10597.                     terminal.  In  this  mode,  if  no  key  has  been
  10598.                     struck,  TECO  returns a -1 as the value of the ^T
  10599.                     command.  This mode is entered by setting the 32's
  10600.                     bit of the ET flag.
  10601.  
  10602.      Scrolling      A  form  of  TECO  operation  available   on   CRT
  10603.                     terminals   capable   of  supporting  split-screen
  10604.                     operation.  The bottom n lines are used for TECO's
  10605.  
  10606.      Standard TECO                                            PAGE 209
  10607.      Glossary
  10608.  
  10609.  
  10610.                     asterisk prompt and the usual typed command lines;
  10611.                     the  remaining  lines  above  are  used   for   an
  10612.                     automatically-updated window into the text buffer.
  10613.                     A valuable training aid:  one can experiment  with
  10614.                     TECO   commands   and  immediately  observe  their
  10615.                     effects.  Not  a  bad  idea  for  advanced  users,
  10616.                     either.  Controlled by the n,7:W command.
  10617.  
  10618.      SEALL mode     A mode of window operation in which all characters
  10619.                     have  a  distinctive  visible  display,  including
  10620.                     characters such as <TAB>, <CR>,  and  <LF>,  which
  10621.                     normally do not print.  Controlled by the 3:W flag
  10622.                     (see section 5.17).   Also  known  as  "View  all"
  10623.                     mode.
  10624.  
  10625.      Search verification flag
  10626.                     A  flag,  referenced  by  the  ES  command,   that
  10627.                     controls  the  action  of  TECO  subsequent to the
  10628.                     execution of a command string  containg  a  search
  10629.                     command.   Proper setting of this flag will enable
  10630.                     the user to verify that  the  search  located  the
  10631.                     correct  string, by having the line containing the
  10632.                     string  found  displayed  on  the  terminal.   See
  10633.                     section 5.16 for more details.
  10634.  
  10635.      Search mode flag
  10636.                     A  flag,  referenced  by  the  ^X  command,   that
  10637.                     controls  how  TECO treats alphabetical characters
  10638.                     within search strings.  This flag is used  to  put
  10639.                     TECO  into  either exact-case mode, or either-case
  10640.                     mode.  If the ^X flag is set  to  0,  then  either
  10641.                     case  matches  in searches.  If the ^X flag is set
  10642.                     to 1, then exact case matches are required.
  10643.  
  10644.      Secondary input stream
  10645.                     A term used by TECO-11 to refer  to  an  auxiliary
  10646.                     input  "channel"  that was formed by use of the EP
  10647.                     command.
  10648.  
  10649.      Secondary output stream
  10650.                     A term used by TECO-11 to refer  to  an  auxiliary
  10651.                     output  "channel" that was formed by use of the EA
  10652.                     command.  See section 5.1.4 for details.
  10653.  
  10654.      Scope editing mode
  10655.                     A mode of TECO in which command line scope editing
  10656.                     (q.v.)  algorithms are used.  This mode is enabled
  10657.                     by setting the 2's bit of  the  ET  flag.   It  is
  10658.                     usually  automatically  enabled  by  TECO  if  the
  10659.                     operating system can  detect  that  the  user  has
  10660.                     invoked  TECO  from a scope terminal.  Opposite of
  10661.                     hard-copy editing mode.
  10662.  
  10663.      Standard TECO                                            PAGE 210
  10664.      Glossary
  10665.  
  10666.  
  10667.      Split Q-registers
  10668.                     The feature of TECO that permits storing of both a
  10669.                     number  and  a  string  within a Q-register.  Each
  10670.                     Q-register can be considered  to  consist  of  two
  10671.                     compartments.
  10672.  
  10673.      String build construct
  10674.                     A command, consisting of special characters,  used
  10675.                     within a text argument to build up the contents of
  10676.                     the text argument from other components.
  10677.  
  10678.      SUPER TECO mode
  10679.                     A mode of TECO-8 wherein TECO will read  past  the
  10680.                     end-of-file  mark  (CTRL/Z)  of a sequential ASCII
  10681.                     file.  This mode is enabled by using the /S switch
  10682.                     on  an  ER or EB command and is terminated when an
  10683.                     ER or EB command is  issued  with  no  /S  switch.
  10684.                     This  mode  is  useful  for  scanning through mass
  10685.                     storage devices in an attempt to recover data from
  10686.                     files that had previously been deleted.
  10687.  
  10688.      Switch         A construct of the  form  /SWITCH  used  within  a
  10689.                     command  that takes a filespecification, to modify
  10690.                     the action of the command  or  attributes  of  the
  10691.                     file specified.  Also known as a qualifier.
  10692.  
  10693.      Tag            A label specified within exclamation marks to mark
  10694.                     a  point  within  a  TECO program.  Control can be
  10695.                     transferred to this point by the  use  of  a  GOTO
  10696.                     (Otag`) command.
  10697.  
  10698.      TECO           Text Editor and COrrector program.
  10699.  
  10700.      TECO.INI       A file containing TECO commands that is used as  a
  10701.                     user's  private  initialization  file.   When TECO
  10702.                     starts up, it looks for such a file in the  user's
  10703.                     area,  and  if  it finds one, the TECO commands in
  10704.                     this file are executed before editing commences.
  10705.  
  10706.      TECO.TEC       A TECO macro used by  many  operating  systems  to
  10707.                     parse the user's edit-class commands.
  10708.  
  10709.      TECO I/O mode  A mode of  I/O  operation  under  the  RSTS/E  and
  10710.                     RSX-11  operating  systems,  in  which  the system
  10711.                     buffers most characters and returns control to the
  10712.                     caller   (usually   TECO)  only  when  interesting
  10713.                     characters (such as <DELETE>, <DELIM>,  etc.)  are
  10714.                     typed.
  10715.  
  10716.      TECO's prompt  refers to the asterisk (*)  that  TECO  prints  to
  10717.                     indicate that it is ready to accept commands.
  10718.  
  10719.      Standard TECO                                            PAGE 211
  10720.      Glossary
  10721.  
  10722.  
  10723.      TECO SIG       A DECUS  Special  Interest  Group,  consisting  of
  10724.                     users   who   are  dedicated  to  the  spread  of,
  10725.                     improvement of, and standardization of TECO.
  10726.  
  10727.      Terminal characteristics flag
  10728.                     A bit-encoded flag, referenced via the ET command,
  10729.                     that contains information about the user's console
  10730.                     terminal and specifies in what manner TECO  should
  10731.                     support it.
  10732.  
  10733.      Text buffer
  10734.                     The main buffer used by TECO to hold the  text  to
  10735.                     be edited.
  10736.  
  10737.      Text buffer pointer
  10738.                     A pointer that marks the position within the  text
  10739.                     buffer where TECO is currently 'at'.  This pointer
  10740.                     always points to positions between characters;  it
  10741.                     never   points   at   a  character.   The  current
  10742.                     character  is  considred  to  be   the   character
  10743.                     immediately  to  the right of the current position
  10744.                     of the text buffer pointer.
  10745.  
  10746.      Then-clause    The set of commands within a conditional that  are
  10747.                     executed  if the condition is satisfied.  In TECO,
  10748.                     these commands immediately follow the  "X  at  the
  10749.                     start  of the conditional.  They are terminated by
  10750.                     a | or ' character.
  10751.  
  10752.      Tracing        The  act  of   watching   the   command-by-command
  10753.                     execution of a TECO program.  This is accomplished
  10754.                     by putting TECO into trace mode, via use of the  ?
  10755.                     command.
  10756.  
  10757.      Trace mode     A mode  of  TECO  wherein  each  command  that  is
  10758.                     executed  by  TECO is also displayed on the user's
  10759.                     terminal as it is being executed.   This  mode  is
  10760.                     useful  for  debugging  complicated TECO programs.
  10761.                     TECO is toggled in and out of this mode via use of
  10762.                     the  ?   command.   See  section  5.18.4  for more
  10763.                     details.
  10764.  
  10765.      Truncate mode  A mode of TECO's window support wherein lines that
  10766.                     are  too  long to fit on a single physical line of
  10767.                     the user's terminal are truncated when  the  right
  10768.                     margin  of the scope is encountered.  This mode is
  10769.                     entered by setting the 256's bit in the  ET  flag.
  10770.                     Opposite of line-wrap mode.
  10771.  
  10772.      Type-out-time command
  10773.                     A special command that makes sense only while TECO
  10774.                     is   typing  out  text  on  the  terminal.   These
  10775.                     commands are <CTRL/S>, <CTRL/Q>, and <CTRL/O>  and
  10776.  
  10777.      Standard TECO                                            PAGE 212
  10778.      Glossary
  10779.  
  10780.  
  10781.                     affect the type out.
  10782.  
  10783.      Up-arrow mode  A standard mode of  operation  wherein  upon  type
  10784.                     out,  TECO  will  display  control  characters  by
  10785.                     typing the visible two-character  sequence  ^X  to
  10786.                     represent the control character <CTRL/X>.  On many
  10787.                     older terminals, the caret  character  (^),  whose
  10788.                     octal  ASCII  code  is 136, prints as an up-arrow.
  10789.                     Some  control  characters  are  not   printed   in
  10790.                     up-arrow  mode,  notably  <TAB>, <LF>, <VT>, <FF>,
  10791.                     and <CR>.
  10792.  
  10793.      Upper/lower case flag
  10794.                     A  flag,  referenced  by  the  EU  command,   that
  10795.                     specifies  whether  or  not  case  flagging  is to
  10796.                     occur.  If set to -1, no case flagging occurs.  If
  10797.                     set  to  0,  lower  case characters are flagged on
  10798.                     type out.  If set to +1, upper case characters are
  10799.                     flagged on type out.
  10800.  
  10801.      View all mode  A mode of window operation in which all characters
  10802.                     have  a  distinctive  visible  display,  including
  10803.                     characters such as <TAB>, <CR>,  and  <LF>,  which
  10804.                     normally do not print.  Controlled by the 3:W flag
  10805.                     (see section 5.17).  Also known as SEALL mode.
  10806.  
  10807.      War and Peace mode
  10808.                     A mode of operation in which TECO outputs a  large
  10809.                     informative paragraph of information automatically
  10810.                     upon encountering an error in  a  user's  program.
  10811.                     This  paragraph of information describes the error
  10812.                     in painstaking detail and tells the  user  how  to
  10813.                     recover.  This mode is entered by setting the help
  10814.                     level to 3.  This mode is particularly  useful  to
  10815.                     Novices and particularly obnoxious to experts.
  10816.  
  10817.      Window         The portion of the text buffer that  is  currently
  10818.                     being   displayed   on   the  user's  terminal  or
  10819.                     auxiliary display device.
  10820.  
  10821.      Window support
  10822.                     Assembly language  code,  built  into  TECO,  that
  10823.                     maintains  a  window  into  the text buffer on the
  10824.                     user's terminal or auxiliary display device.
  10825.  
  10826.      Yank protection
  10827.                     A feature of TECO wherein any Y, _, or F_  command
  10828.                     that   will  potentially  destroy  valid  data  is
  10829.                     aborted.  This mode is normally enabled  and  will
  10830.                     cause  any of the aforementioned commands to abort
  10831.                     with the ?YCA error message if there  is  text  in
  10832.                     the  text buffer and an output file is open.  This
  10833.                     feature can be disabled by turning off the 2's bit
  10834.  
  10835.      Standard TECO                                            PAGE 213
  10836.      Glossary
  10837.  
  10838.  
  10839.                     in the ED flag.
  10840.  
  10841.      Standard TECO                                            PAGE 214
  10842.      Index
  10843.  
  10844.  
  10845.                          INDEX TO TECO COMMANDS
  10846.                          AND SPECIAL CHARACTERS
  10847.  
  10848.  
  10849.       NULL   Discarded on input; Ignored in comman  . . 119
  10850.       ^A     Output message to terminal . . . . . . . . 64
  10851.       ^B     Current date . . . . . . . . . . . . . . . 90
  10852.       ^C     Stop execution . . . . . . . . . . . . . . 40, 53, 99
  10853.       ^D     Set radix to decimal . . . . . . . . . . . 87
  10854.       ^E     Form Feed flag . . . . . . . . . . . . . . 90
  10855.       ^E<n>  (Match char) Match ASCII code n  . . . . . 79
  10856.       ^EA    (Match char) Match alphabetics . . . . . . 78
  10857.       ^EB    (Match char) Match separator char  . . . . 78
  10858.       ^EC    (Match char) Match Symbol Constituent  . . 78
  10859.       ^ED    (Match char) Match numerics  . . . . . . . 78
  10860.       ^EGq   (Match char) Match contents of Q-reg   . . 78
  10861.       ^EL    (Match char) Match line terminators  . . . 78
  10862.       ^EMx   (Match char) Match any number of x . . . . 78
  10863.       ^EQq   (String char) Use contents of Q-reg q  . . 77
  10864.       ^ER    (Match char) Match alphanumerics . . . . . 78
  10865.       ^ES    (Match char) Match non-null space/tab  . . 78
  10866.       ^EUq   (String char) Use ASCII code in Q-reg  . . 77
  10867.       ^EV    (Match char) Match lower case alphabe  . . 78
  10868.       ^EW    (Match char) Match upper case alphabe  . . 78
  10869.       ^EX    (Match char) Match any character . . . . . 79
  10870.       ^E[]   (Match char) Match one of list . . . . . . 79
  10871.       ^F     Contents of console switch register  . . . 90
  10872.       n^F    Return terminal number of job n  . . . . . 91
  10873.       ^G^G   Kill command string  . . . . . . . . . . . 40
  10874.       ^G<sp> Retype current command line  . . . . . . . 40
  10875.       ^G*    Retype current command input . . . . . . . 40
  10876.       ^H     Current time of day  . . . . . . . . . . . 91
  10877.       BS     Back up and type one line  . . . . . . . . 17, 41
  10878.       TAB    Insert tab and text  . . . . . . . . . . . 69
  10879.       LF     Line terminator; Ignored in commands . . . 9, 34, 117
  10880.       LF     Advance and type one line  . . . . . . . . 17, 41
  10881.       VT     Line terminator; Not a TECO command  . . . 34
  10882.       FF     Page terminator; Output Form Feed  . . . . 9, 34
  10883.       CR     End input line; Ignored in commands  . . . 9, 40, 117
  10884.       ^N     End of file flag . . . . . . . . . . . . . 91
  10885.       ^Nx    (Match char) Match all but x . . . . . . . 77
  10886.       ^O     Set radix to octal . . . . . . . . . . . . 87
  10887.       ^O     Kill terminal output . . . . . . . . . . . 65
  10888.       ^P     Not a TECO command . . . . . . . . . . . . 214
  10889.       ^Q     Resume terminal output . . . . . . . . . . 65
  10890.       ^Q     Convert line arg into character arg  . . . 146, 150
  10891.       ^Qx    (String char) Use x literally  . . . . . . 76
  10892.       ^R     Value of current radix . . . . . . . . . . 87
  10893.       n^R    Set radix to n . . . . . . . . . . . . . . 87
  10894.       ^Rx    (String char) Use x literally  . . . . . . 76
  10895.       ^S     -(length) of last referenced string  . . . 91
  10896.       ^S     Suspend terminal output  . . . . . . . . . 65
  10897.       ^S     Save last command string . . . . . . . . . 149
  10898.  
  10899.      Standard TECO                                            PAGE 215
  10900.      Index
  10901.  
  10902.  
  10903.       ^S     (Match char) Match separator char  . . . . 77
  10904.       ^T     ASCII value of next character typed  . . . 91
  10905.       ^T     Read and decode next keystroke typed . . . 91
  10906.       n^T    Type ASCII character of value n  . . . . . 63
  10907.       n:^T    Output binary byte of value n  . . . . . . . 63
  10908.       ^U     Kill command line  . . . . . . . . . . . . 40
  10909.       ^Uq    Put string into Q-register q . . . . . . . 80
  10910.       :^Uq   Append string to Q-register q  . . . . . . 81
  10911.       n^Uq   Put ASCII char "n" into Q-register q . . . 81
  10912.       n:^Uq  Append ASCII char "n" to Q-register q  . . 81
  10913.       ^V     Enable lower case conversion . . . . . . . 121
  10914.       ^Vx    (String char) Force x to lower case  . . . 76
  10915.       ^W     Enable upper case conversion . . . . . . . 121
  10916.       ^W     Refresh scrolled display . . . . . . . . . 41
  10917.       ^Wx    (String char) Force x to upper case  . . . 76
  10918.       ^X     Search mode flag . . . . . . . . . . . . . 112
  10919.       ^X     (Match char) Match any character . . . . . 77
  10920.       ^Y     Equivalent to ".+^S,." . . . . . . . . . . 92
  10921.       ^Z     Size of text in all Q-registers  . . . . . 92
  10922.       ^Z^Z^Z Immediate exit from TECO . . . . . . . . . 40
  10923.       ESC    String and command terminator  . . . . . . 7, 39, 99
  10924.       ESC    String and command terminator  . . . . . . 119
  10925.       ^[     String and command terminator  . . . . . . 119
  10926.       ^\     Not a TECO command . . . . . . . . . . . . 214
  10927.       ^]     Not a TECO command . . . . . . . . . . . . 214
  10928.       ^^x    ASCII value of x . . . . . . . . . . . . . 92
  10929.       ^_     Ones complement (logical NOT)  . . . . . . 86
  10930.       SP     Ignored in commands  . . . . . . . . . . . 117
  10931.       !      Define label . . . . . . . . . . . . . . . 95
  10932.       "      Start conditional  . . . . . . . . . . . . 101
  10933.       n"<    Test for less than zero  . . . . . . . . . 102
  10934.       n"=    Test for equal to zero . . . . . . . . . . 102
  10935.       n">    Test for greater than zero . . . . . . . . 102
  10936.       n"A    Test for alphabetic  . . . . . . . . . . . 101
  10937.       n"C    Test for symbol constituent  . . . . . . . 101
  10938.       n"D    Test for numeric . . . . . . . . . . . . . 102
  10939.       n"E    Test for equal to zero . . . . . . . . . . 102
  10940.       n"F    Test for false . . . . . . . . . . . . . . 102
  10941.       n"G    Test for greater than zero . . . . . . . . 102
  10942.       n"L    Test for less than zero  . . . . . . . . . 102
  10943.       n"N    Test for not equal to zero . . . . . . . . 102
  10944.       n"R    Test for alphanumeric  . . . . . . . . . . 102
  10945.       n"S    Test for successful  . . . . . . . . . . . 102
  10946.       n"T    Test for true  . . . . . . . . . . . . . . 102
  10947.       n"U    Test for unsuccessful  . . . . . . . . . . 102
  10948.       n"V    Test for lower case  . . . . . . . . . . . 102
  10949.       n"W    Test for upper case  . . . . . . . . . . . 102
  10950.       #      Logical OR . . . . . . . . . . . . . . . . 86
  10951.       $      Separate TECO commands . . . . . . . . . . 120
  10952.       $      ESCape (no surrogate) typeout  . . . . . . 3
  10953.       n%q    Add n to Q-register q and return resu  . . 80
  10954.       &      Logical AND  . . . . . . . . . . . . . . . 86
  10955.       '      End conditional  . . . . . . . . . . . . . 101
  10956.  
  10957.      Standard TECO                                            PAGE 216
  10958.      Index
  10959.  
  10960.  
  10961.       (      Expression grouping  . . . . . . . . . . . 86
  10962.       )      Expression grouping  . . . . . . . . . . . 86
  10963.       *      Multiplication . . . . . . . . . . . . . . 86
  10964.       *q     Save last command in Q-register q  . . . . 42
  10965.       +      Addition . . . . . . . . . . . . . . . . . 86
  10966.       ,      Argument separator . . . . . . . . . . . . 86
  10967.       -      Subtraction or negation  . . . . . . . . . 86
  10968.       .      Current pointer position . . . . . . . . . 89
  10969.       /      Division . . . . . . . . . . . . . . . . . 86
  10970.       /      Type detailed explanation of error . . . . 41
  10971.       0-9    Digit  . . . . . . . . . . . . . . . . . . 214
  10972.       :      Modify next command  . . . . . . . . . . . 33
  10973.       ;      Exit iteration on search failure . . . . . 97
  10974.       n;     Exit iteration if n is positive  . . . . . 97
  10975.       :;     Exit iteration on search success . . . . . 97
  10976.       n:;    Exit iteration if n is negative  . . . . . 97
  10977.       n<     Iterate n times  . . . . . . . . . . . . . 94
  10978.       =      Type in decimal  . . . . . . . . . . . . . 87
  10979.       ==     Type in octal  . . . . . . . . . . . . . . 87
  10980.       ===    Type in hexadecimal  . . . . . . . . . . . 87
  10981.       :=     Type in decimal, no carriage return  . . . 87
  10982.       :==    Type in octal, no carriage return  . . . . 87
  10983.       :===   Type in hexadecimal, no carriage retu  . . 87
  10984.       >      End iteration  . . . . . . . . . . . . . . 94
  10985.       ?      Toggle trace mode  . . . . . . . . . . . . 119
  10986.       ?      Type out command string in error . . . . . 41
  10987.       @      Modify next text argument  . . . . . . . . 33
  10988.       A      Append to buffer . . . . . . . . . . . . . 58
  10989.       nA     ASCII value of char in buffer  . . . . . . 89
  10990.       n:A    Append n lines to buffer . . . . . . . . . 58
  10991.       B      0 - beginning of buffer  . . . . . . . . . 89
  10992.       nC     Advance n characters . . . . . . . . . . . 61
  10993.       nD     Delete n characters  . . . . . . . . . . . 66
  10994.       m,nD   Delete between m and n . . . . . . . . . . 66
  10995.       DELIM  Character typed as surrogate for ESCa  . . 2, 7, 30, 39, 107, 111
  10996.       DELIM  Advance and type one line  . . . . . . . . 17, 41
  10997.       E%q    Write Q-register q into a file . . . . . . 57
  10998.       EA     Select secondary output stream . . . . . . 54
  10999.       EB     Open input and output  . . . . . . . . . . 49
  11000.       EC     Close out (copy in to out and close) . . . 52
  11001.       ED     Edit mode flag . . . . . . . . . . . . . . 105
  11002.       EE     ESCape surrogate character . . . . . . . . 107
  11003.       EF     Close output file  . . . . . . . . . . . . 52
  11004.       EG     Close out and exit with command  . . . . . 52
  11005.       :EG    Execute operating system function  . . . . 52, 148, 149
  11006.       EH     Help level flag  . . . . . . . . . . . . . 107
  11007.       EI     Open indirect command file . . . . . . . . 54
  11008.       m,nEJ  Set environment characteristics  . . . . . 104
  11009.       nEJ    Return environment characteristics . . . . 103
  11010.       EK     Kill output file . . . . . . . . . . . . . 53
  11011.       EL     Open log file  . . . . . . . . . . . . . . 53
  11012.       nEM    Position magtape . . . . . . . . . . . . . 150
  11013.       EN     Wildcard lookup  . . . . . . . . . . . . . 56
  11014.  
  11015.      Standard TECO                                            PAGE 217
  11016.      Index
  11017.  
  11018.  
  11019.       EO     Version of TECO  . . . . . . . . . . . . . 93
  11020.       nEO    Set TECO to function as version n  . . . . 108
  11021.       EP     Select secondary input stream  . . . . . . 54
  11022.       EQq    Read file into Q-register q  . . . . . . . 56
  11023.       ER     Open input file  . . . . . . . . . . . . . 49, 54
  11024.       ES     Search verification flag . . . . . . . . . 108
  11025.       ET     Type out control flag  . . . . . . . . . . 109
  11026.       EU     Case flagging flag . . . . . . . . . . . . 112
  11027.       EV     Edit verify flag . . . . . . . . . . . . . 112
  11028.       EW     Open output file . . . . . . . . . . . . . 50, 54
  11029.       EX     Close out and exit . . . . . . . . . . . . 53
  11030.       EY     Read without yank protection . . . . . . . 60
  11031.       EZ     Zero output tape . . . . . . . . . . . . . 53
  11032.       nE_    Search without yank protection . . . . . . 72
  11033.       F'     Flow to end of conditional . . . . . . . . 98
  11034.       F<     Flow to start of iteration . . . . . . . . 98
  11035.       F>     Flow to end of iteration . . . . . . . . . 98
  11036.       F|     Flow to ELSE part of conditional . . . . . 99
  11037.       m,nFB  Search between locations m and n . . . . . 73
  11038.       nFB    Search, bounded by n lines . . . . . . . . 73
  11039.       m,nFC  Search and replace between m and n . . . . 74
  11040.       nFC    Search and replace over n lines  . . . . . 74
  11041.       nFD    Search and delete string . . . . . . . . . 66, 74
  11042.       nFK    Search and delete intervening text . . . . 67, 74
  11043.       nFN    Global string replace  . . . . . . . . . . 73
  11044.       FR     Replace last string  . . . . . . . . . . . 69
  11045.       nFS    Local string replace . . . . . . . . . . . 73
  11046.       nF_    Destructive search and replace . . . . . . 74
  11047.       Gq     Get string from Q-register q into buf  . . 83
  11048.       G*     Get last filespec string into buffer . . . 145
  11049.       :Gq    Type Q-register q on terminal  . . . . . . 83
  11050.       G_     Get last search string into buffer . . . . 146
  11051.       H      Equivalent to "B,Z"  . . . . . . . . . . . 89
  11052.       I      Insert text  . . . . . . . . . . . . . . . 68
  11053.       nI     Insert ASCII character "n" . . . . . . . . 68
  11054.       nJ     Move pointer to "n"  . . . . . . . . . . . 61
  11055.       nK     Kill n lines . . . . . . . . . . . . . . . 66
  11056.       m,nK   Delete between m and n . . . . . . . . . . 67
  11057.       nL     Advance n lines  . . . . . . . . . . . . . 62
  11058.       Mq     Execute string in Q-register q . . . . . . 84, 90
  11059.       nN     Global search  . . . . . . . . . . . . . . 72
  11060.       O      Go to label  . . . . . . . . . . . . . . . 95
  11061.       nO     Computed goto  . . . . . . . . . . . . . . 96
  11062.       nP     Advance or back up n pages . . . . . . . . 59
  11063.       m,nP   Write out chars m to n . . . . . . . . . . 59
  11064.       nPW    Write buffer n times . . . . . . . . . . . 59
  11065.       m,nPW  Write out chars m to n . . . . . . . . . . 59
  11066.       Qq     Number in Q-register q . . . . . . . . . . 83, 90
  11067.       :Qq    Size of text in Q-register q . . . . . . . 83, 90
  11068.       nR     Back up n characters . . . . . . . . . . . 62
  11069.       nS     Local search . . . . . . . . . . . . . . . 71
  11070.       m,nS   Search for nth occurrence within m ch  . . 145
  11071.       ::S    Compare string . . . . . . . . . . . . . . 73
  11072.  
  11073.      Standard TECO                                            PAGE 218
  11074.      Index
  11075.  
  11076.  
  11077.       SEEALL "View All" characters display mode . . . . 29
  11078.       nT     Type n lines . . . . . . . . . . . . . . . 63
  11079.       m,nT   Type from m to n . . . . . . . . . . . . . 63
  11080.       nUq    Put number n into Q-register q . . . . . . 80
  11081.       nV     Type n current lines . . . . . . . . . . . 63
  11082.       m,nV   Type m before & n after current line . . . 64
  11083.       W      Scope "WATCH"  . . . . . . . . . . . . . . 113
  11084.       n:W    Return scope characteristics . . . . . . . 114, 146
  11085.       m,n:W  Set scope characteristics  . . . . . . . . 115
  11086.       nXq    Put n lines into Q-register q  . . . . . . 81
  11087.       m,nXq  Put characters m to n into Q-register  . . 81
  11088.       n:Xq   Append n lines to Q-register q . . . . . . 82
  11089.       m,n:Xq Append characters m to n into Q-regis  . . 82
  11090.       Y      Read into buffer . . . . . . . . . . . . . 59
  11091.       Z      End of buffer value  . . . . . . . . . . . 89
  11092.       [q     Q-register push  . . . . . . . . . . . . . 83
  11093.       \      Value of digit string in buffer  . . . . . 88, 90
  11094.       n\     Convert n to digits in buffer  . . . . . . 88
  11095.       ]q     Q-register pop . . . . . . . . . . . . . . 82
  11096.       n_     Global search without output . . . . . . . 72
  11097.       `      ESCape surrogate typeout . . . . . . . . . 3, 30, 39, 107, 111
  11098.       a-z    Treated the same as upper case A-Z . . . . 214
  11099.       {      Not a TECO command . . . . . . . . . . . . 214
  11100.       |      Start ELSE part of conditional . . . . . . 101
  11101.       }      Not a TECO command . . . . . . . . . . . . 214
  11102.       ~      Not a TECO command . . . . . . . . . . . . 214
  11103.       DEL    Delete last character typed in . . . . . . 39
  11104.  
  11105.